4

有没有人尝试实现 Facebook SDK 和 Fresco lib 和 Retrofit?我的 gradle 因重复有关螺栓而失败。

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

这是我的毕业失败。我尝试使用 Fresco for OkHttp,但仍然遇到上述问题。

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

1 回答 1

8

这对我有帮助:

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';
}
于 2016-02-12T08:34:05.413 回答