Pramod Patel Pramod Patel - 1 month ago 46
Android Question

ZipException: duplicate entry : com.nineoldandroids

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 :

enter image description here

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+'
}

Answer

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'    }