首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >React Native: java.util.zip.ZipException:重复条目: com/google/android/gms/iid/zzc.class

React Native: java.util.zip.ZipException:重复条目: com/google/android/gms/iid/zzc.class
EN

Stack Overflow用户
提问于 2017-08-03 22:37:54
回答 3查看 746关注 0票数 0

我正在react native上开发一个项目,一天前还在工作的代码不再工作了。下面是我的build.gradle依赖项:

代码语言:javascript
复制
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'

如果我在任何依赖项上出错了,请让我知道。

下面是完整的错误:

代码语言:javascript
复制
: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

提前感谢!

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2017-09-02 20:23:40

我想通了。依赖项之间的Google Play服务版本不匹配。升级了所有最新的值,现在一切都很好。

票数 1
EN

Stack Overflow用户

发布于 2017-08-03 23:02:39

com.google.android.gms:play-services-maps是重复的,因为它已经包含在具有不同版本的react-native-maps中。

您可以安全地删除它。

票数 1
EN

Stack Overflow用户

发布于 2017-08-04 00:13:21

在库中,react-native-mapscom.google.android.gms:play-services-maps的类是重复的,所以你必须在android gradle中排除zzc.class

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45487369

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档