0
错误:Execution failed for task ':app:transformClassesWithJarMergingForDebug'
。com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复项:com/google/common/base/FinalizableReference.class
com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复的条目:COM /谷歌/普通/基/ FinalizableReference.class
这是例外我编译后得到谷歌番石榴文库。
在这里,问题是一些其他图书馆使用相同的类(duplicacy的问题)
不喜欢列举我的项目使用(../gradlew.bat依赖)的所有库中的所有必要的东西,但发现没有重复的类
在我的Gradle下面。
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.okhttp3:okhttp:3.5.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.5.0'
/*Firebase*/
compile 'com.google.firebase:firebase-messaging:11.0.0'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
/*Header recyclerView*/
compile 'com.karumi:headerrecyclerview:1.1.0'
testCompile 'junit:junit:4.12'
/*Custom snackBar*/
compile 'com.androidadvance:topsnackbar:1.1.1'
/*google services*/
compile 'com.google.android.gms:play-services-location:11.0.0'
compile 'com.google.android.gms:play-services:11.0.0'
/*socket io*/
compile 'com.github.nkzawa:socket.io-client:0.3.0'
/*Map utils library*/
compile 'com.google.maps.android:android-maps-utils:0.5+'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.google.guava:guava:16.0.1'
谢谢,试过这种修复之前无法解决 – logan
@logan检查更新ans –
我在棒棒糖设备上面临这个问题,棉花糖的工作正常。 – logan