prasanthMurugan
prasanthMurugan

Reputation: 617

Execution failed for task ':app:packageAllLocalVersionDebugClassesForMultiDex'

Logcat Error:

Error:Execution failed for task    ':app:packageAllLocalVersionDebugClassesForMultiDex'.>java.util.zip.ZipException: duplicate entry: bolts/AggregateException.class

App Gradle Dependency:

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.jeremyfeinstein.slidingmenu:library:1.3@aar'
compile 'com.daimajia.swipelayout:library:1.1.8@aar'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.loopj.android:android-async-http:1.4.9'

compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.github.traex.rippleeffect:library:1.3'
compile 'com.facebook.fresco:fresco:0.9.0'

compile 'de.hdodenhof:circleimageview:1.3.0'

compile project(':floating_button_library')
compile 'com.facebook.android:facebook-android-sdk:4.10.0'    
}

After adding the dependency for Facebook SDK the build throws an Exception suggest me an answer thanks..

EDIT:

SOLVED THE ERROR

Now they split bolts-android into bolts-applinks and bolts-tasks .so you need exclude both from the gradle build

 compile ('com.facebook.android:facebook-android-sdk:4.10.0'){
    exclude group: 'com.parse.bolts',
            module: 'bolts-tasks'
    exclude group: 'com.parse.bolts',
            module: 'bolts-applinks';}

This works perfectly for me !!!!

Upvotes: 1

Views: 155

Answers (1)

Madhur
Madhur

Reputation: 3353

there were two DIFFERENT versions of it conflicting. the facebooksdk comes with bolts-android-1.1.x and appcompatv7 comes with 1.1.x.

so add below line,

compile ('com.facebook.android:facebook-android-sdk:4.10.0'){
            exclude module: 'bolts-android'
            exclude module: 'support-v4'
        }

Upvotes: 1

Related Questions