我正在开发一个关于 React Native 的项目,一天前工作的相同代码不再工作。这是我的 build.gradle 依赖项:
compile project(':react-native-audio')
compile project(':react-native-fcm')
compile project(':bugsnag-react-native')
compile project(':react-native-code-push')
compile project(':react-native-mixpanel')
compile project(':react-native-vector-icons')
compile project(':react-native-permissions')
compile project(':react-native-maps')
compile project(':react-native-device-info')
compile fileTree(dir: "libs", include: ["*.jar"])
compile ('com.google.firebase:firebase-core:10.2.1') {
force = true;
}
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+"
compile 'com.android.support:multidex:1.0.0'
compile ('com.google.android.gms:play-services-gcm:10.2.1') {
force = true;
}
compile ("com.google.android.gms:play-services-maps:10.2.1") {
force = true;
}
compile project(':react-native-mauron85-background-geolocation')
compile 'com.facebook.fresco:animated-base-support:0.11.0'
compile 'com.facebook.fresco:animated-gif:0.13.0'
compile 'com.facebook.fresco:animated-webp:0.11.0'
compile 'com.facebook.fresco:webpsupport:0.11.0'
compile 'com.facebook.fresco:webpsupport:0.11.0'
如果我的任何依赖项出了问题,请告诉我。
这是完整的错误:
:app:transformClassesWithJarMergingForDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/iid/zzc.class
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 17.05 secs
提前致谢!
最佳答案
com.google.android.gms:play-services-maps
重复,因为它已包含在不同版本的 react-native-maps
中。
您可以安全地将其删除。
关于java - React Native : java. util.zip.ZipException : duplicate entry: com/google/android/gms/iid/zzc. 类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45487369/