Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle failed with Facebook SDK, Fresco lib and Retrofit?

Did anyone tried to implement Facebook SDK and Fresco lib and Retrofit? My gradle fails with duplicate about bolts.

 Error:Execution failed for task   ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException:  java.util.zip.ZipException: duplicate entry:    bolts/AggregateException.class

This is my gradle fail. I tried with Fresco for OkHttp, but still I get the problem above.

dependencies {
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile 'com.facebook.android:facebook-android-sdk:4.+'
    compile 'com.facebook.fresco:fresco:0.9.0'
    compile 'com.facebook.fresco:imagepipeline-okhttp:0.9.0'
    compile 'com.squareup.retrofit2:retrofit:2.0.0-beta4'
    compile 'com.squareup.retrofit2:converter-gson:2.0.0-beta4'
    compile 'com.android.support:multidex:1.0.1'
}
like image 513
Zookey Avatar asked Feb 07 '23 18:02

Zookey


1 Answers

This is what helped me:

compile ('com.facebook.fresco:fresco:0.9.0+'){
    exclude group: 'com.parse.bolts', module: 'bolts-applinks';
    exclude module: 'bolts-android';
    exclude group: 'com.parse.bolts', module: 'bolts-tasks';
}
like image 123
Zookey Avatar answered Feb 11 '23 00:02

Zookey