首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >com/google/android/gms/internal/measurement/zzwn.class : ZipException:重复条目:

com/google/android/gms/internal/measurement/zzwn.class : ZipException:重复条目:
EN

Stack Overflow用户
提问于 2018-08-09 17:39:46
回答 1查看 392关注 0票数 1

出了什么问题:任务':app:transformClassesWithJarMergingForRelease'.的执行失败

com.android.build.api.transform.TransformException: java.util.zip.ZipException:重复条目: com/google/android/gms/internal/measurement/zzwn.class

我试图创建一个任务来删除一个副本,但没有成功。

这项任务:

代码语言:javascript
复制
task findDuplicates {
    doLast {
        def findMe = 'com/google/android/gms/internal/measurement/zzwn.class'
        configurations.compile.asFileTree.matching {
            include '**/*.jar'
        }.files.each { File jarFile ->
            zipTree(jarFile).visit { FileVisitDetails fvd ->
                if (fvd.path == findMe) {
                    println "Found $findMe in $jarFile.name"
                }
            }
        }
    }
}

我的依赖关系:

代码语言:javascript
复制
dependencies {
    compile project(':react-native-fast-image')
    compile project(':react-native-facebook-login')
    compile project(':realm')
    compile project(':react-native-sqlite-storage')
    compile project(':react-native-device-info')
    compile project(':react-native-splash-screen')
    compile project(':react-native-vkontakte-login')
    compile project(':react-native-google-analytics-bridge')
    compile project(':react-native-custom-tabs')
    compile project(':react-native-onesignal')
    compile project(':react-native-fabric')
    compile project(':react-native-vector-icons')
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile 'com.android.support:appcompat-v7:26.1.0'
    compile 'com.facebook.react:react-native:+'  // From node_modules
    compile 'com.facebook.fresco:animated-gif:1.9.0'
    compile('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
        transitive = true;
    }
}
EN

回答 1

Stack Overflow用户

发布于 2018-08-10 06:40:49

我发现react-native-google-analytics-bridgereact-native-onesignal之间存在冲突,我在app/build.gradle中添加了dependencie compile 'com.google.firebase:firebase-messaging:17.1.0'

我希望这会对某人有所帮助。

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

https://stackoverflow.com/questions/51772980

复制
相关文章

相似问题

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