ZipException: duplicate entry: com.nineoldandroids

I added ResideMenu to my project using its gradle dependency. but I get this problem:

Error: execution completed for task ': Application: transformClassesWithJarMergingForDebug'.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com / nineoldandroids / animation / animator $ AnimatorListener.class

when I checked the external libraries, I found that libraries-2.4.0 and resideMenu-1.6 both contain com.nineoldandroids:

enter image description here

I went through almost all similar problems here in stackoverflow and tried the solutions. Can someone tell me what needs to be done to fix this issue.

Below are the dependencies that I use in my project:

dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:appcompat-v7:24.2.1' compile 'com.jakewharton:butterknife:7.0.1' compile 'com.squareup.picasso:picasso:2.5.2' compile 'com.pnikosis:materialish-progress:1.7' compile 'com.loopj.android:android-async-http:1.4.9' compile 'com.google.code.gson:gson:2.6.2' compile 'com.wrapp.floatlabelededittext:library:0.0.6' compile 'com.android.support:multidex:1.0.1' compile 'com.specyci:residemenu:1.6+' } 
+5
source share
3 answers

Adding the exclude command to another library resolved the issue:

 compile ('com.wrapp.floatlabelededittext:library:0.0.6'){ exclude group: 'com.nineoldandroids', module: 'library' } compile ('com.specyci:residemenu:1.6+') { exclude group: 'com.nineoldandroids', module: 'library' } 
+2
source

You can exclude 9-dimensional indexes from your dependencies. i.e:

Edit below:

 compile 'com.specyci:residemenu:1.6+' 

Wherein:

 compile ('com.specyci:residemenu:1.6+') { exclude group: 'com.nineoldandroids', module: 'library' } 

NOTE. To display all child dependency trees, use the gradle dependencies or gradlew dependencies . Then you can get the correct group and module names for the library that you want to exclude.

+3
source

You must first add the ResideMenu library to your project. Then open the Gradle file from the ResideMenu library. In the dependencies, clear the line compile fileTree (dir: 'libs', include: ['* .jar']) and replace the line below: compile 'com.nineoldandroids: library: 2.4.0'

0
source

Source: https://habr.com/ru/post/1257493/


All Articles