Reputation: 1463
I added ResideMenu in my project using its gradle dependency. but i am getting this issue :
Error:Execution failed for task ':app: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 library-2.4.0 and resideMenu-1.6 both contains com.nineoldandroids :
I went through almost all similar problems here on stackoverflow and tried the solutions. Can anyone tell me what needs to be done to remove this issue.
Below are the dependencies that i am using 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+'
}
Upvotes: 4
Views: 1888
Reputation: 59
You must first add the ResideMenu library manually to your project. Then open the Gradle file from the ResideMenu library. On the dependencies,clean of the compile fileTree line (dir: 'libs', include: ['* .jar']) And replace the line below: compile 'com.nineoldandroids:library:2.4.0'
Upvotes: 0
Reputation: 1463
Adding exclude command with 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' }
Upvotes: 2
Reputation: 15533
You can exclude nineoldandroids from one your your dependencies. i.e:
Change below:
compile 'com.specyci:residemenu:1.6+'
With this:
compile ('com.specyci:residemenu:1.6+') {
exclude group: 'com.nineoldandroids', module: 'library'
}
NOTE: To list all sub dependencies tree, use gradle dependencies
or gradlew dependencies
commands. Then you can get the correct group and module names for the library which you want to exclude.
Upvotes: 4