java - React Native : java. util.zip.ZipException : duplicate entry: com/google/android/gms/iid/zzc. 类

标签 java android react-native

我正在开发一个关于 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/

相关文章:

java - 访问 IBM Notes Web 提供程序中的当前 session

java - JVM堆空间分配困惑

安卓类连接服务

c# - Xamarin "Aapt.exe"退出,代码为 -1073741819

database - 如何使用React Native将数据存储在本地存储中?

java - Java Trove 中的单例集合

java - GWT 中scheduleDeferred 的用法?

java - 使用gradle构建Android应用程序时如何删除特定权限?

reactjs - 在 React Native 中使用 useContext 的上下文 API 显示 TypeError

javascript - 在 React Native 中将 props 样式添加到现有组件样式