【问题标题】:Gradle failed with Facebook SDK, Fresco lib and Retrofit?Gradle 在 Facebook SDK、Fresco lib 和 Retrofit 上失败了?
【发布时间】:2016-02-10 22:48:03
【问题描述】:

有人尝试实现 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'
}

【问题讨论】:

标签: android facebook-sdk-4.0 retrofit2 fresco


【解决方案1】:

这对我有帮助:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-02
    • 2012-09-17
    • 1970-01-01
    • 1970-01-01
    • 2019-03-27
    • 1970-01-01
    相关资源
    最近更新 更多