I'm trying to include ListViewAnimations in my project.

  1. https://github.com/nhaarman/ListViewAnimations/blob/master/README.md

  2. http://nhaarman.imtqy.com/ListViewAnimations/#getting-started

  3. https://www.youtube.com/watch?v=Hgc51aJJfNc

Everything, like, I do according to the instructions, but the project is not compiled and gives me an error unknown to me:

 `Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'. com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/maven/com.nineoldandroids/library/pom.properties File1: C:\Users\Igor\Desktop\ListViewAnimations-master\SuckAndroid\app\libs\nineoldandroids-2.4.0.jar File2: C:\Users\Igor\.gradle\caches\modules-2\files-2.1\com.nineoldandroids\library\2.4.0\e9b63380f3a242dbdbf103a2355ad7e43bad17cb\library-2.4.0.jar` 

Please tell me how to fix it. Thank you in advance)

    1 answer 1

    You have duplicated some files / libraries. Try adding this in build.gradle :

     packagingOptions { exclude 'META-INF/DEPENDENCIES' exclude 'META-INF/NOTICE' exclude 'META-INF/LICENSE' exclude 'META-INF/LICENSE.txt' exclude 'META-INF/NOTICE.txt' }