Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java.util.zip.ZipException: duplicate entry: android/support/v4/accessibilityservice/AccessibilityServiceInfoCompatJellyBeanMr2.class

I am integrating my project into another app in android studio but it shows the below error, I am googling the issue but no use.

Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.
> java.util.zip.ZipException: duplicate entry: android/support/v4/accessibilityservice/AccessibilityServiceInfoCompatJellyBeanMr2.class

below is my app dependencies

configurations { all*.exclude group: 'com.android.support', module: 'support-annotations' }
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile project(':waleteros')
        compile 'com.android.support:recyclerview-v7:+'
       compile 'com.squareup.picasso:picasso:2.4.0'
    compile 'com.jakewharton:butterknife:5.1.2'
    compile files('src/libs/android_sync_service_library.jar')
    compile "com.google.android.gms:play-services:3.1.+"
    compile('com.crashlytics.sdk.android:crashlytics:2.2.2@aar') {
        transitive = true;
    }

and here is my library dependencies

configurations { all*.exclude group: 'com.android.support', module: 'support-v4' }
configurations { all*.exclude group: 'com.android.support', module: 'support-annotations' }
dependencies {
    compile project(':ingosdk')
    compile 'com.google.code.gson:gson:2.2.4'
    compile files('libs/A2iA.Mobility.jar')
    compile files('libs/acra-4.5.0.jar')
    compile files('libs/bugsense-3.5.jar')
    compile files('libs/deviceprint-lib-1.0.0.jar')
    compile files('libs/FlurryAnalytics-5.3.0.jar')
    compile files('libs/httpmime-4.1.2.jar')
    compile files('libs/libGoogleAnalyticsServices.jar')
    compile files('libs/volley.jar')
    compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
    compile files('libs/android-support-v13.jar')

}
like image 623
Ashok Avatar asked Jun 19 '15 11:06

Ashok


1 Answers

If you have the android-support-v4.jar in your libs folder.. delete it!

That solved my problem.

Even though the file is not added in the build.gradle file.. gradle includes it in the build anyway.

like image 111
Goran Ch. Avatar answered Dec 29 '22 01:12

Goran Ch.