1
爲什麼我得到這個錯誤,當我同步gradle時不會發生這種錯誤,但是當我運行該項目時,出現此錯誤。com.android.build.api.transform.TransformException:
任務':app:transformClassesWithJarMergingForDebug'的執行失敗。
com.android.build.api.transform.TransformException:java.util.zip.ZipException:重複的條目:COM /谷歌/安卓/ GMS /普通/ API/zzf.class
我不知道哪個依賴會導致這個錯誤,我的依賴是。
dependencies {
compile project(':RNAdMob')
compile project(':react-native-maps')
compile project(':react-native-fcm')
compile project(':react-native-device-info')
compile project(':react-native-splash-screen')
compile project(':react-native-calendar-events')
compile project(':react-native-device-token')
compile project(':react-native-vector-icons')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
compile (project(':react-native-fcm')){
exclude group: "com.google.firebase"
}
compile(project(':react-native-maps')){
exclude group: 'com.google.android.gms', module: 'play-services-base'
exclude group: 'com.google.android.gms', module: 'play-services-maps'
}
compile ("com.google.android.gms:play-services-base:10.0.1")
{
force = true;
}
compile ("com.google.android.gms:play-services-maps:10.0.1")
{
force = true;
}
compile ('com.google.firebase:firebase-core:10.0.1') {
force = true;
}
compile ('com.google.firebase:firebase-messaging:10.0.1') {
force = true;
}
compile (project(':react-native-device-info')){
exclude group: "com.google.android.gms"
}
compile ('com.google.android.gms:play-services-gcm:10.0.1'){
force = true;
}
}
嘗試從':react-native-fcm'排除組:「com.google.android.gms」。 –
對我來說不起作用@EvgeniiKanivets –
儘量將它從一個一個的地方排除) –