当前位置: 首页 > 知识库问答 >
问题:

ZipException:重复输入:com/google/android/gms/internal/measurement/zzwn。班

何华灿
2023-03-14

出错的地方:任务': app: transformClassesSusJarMergingForReleas'执行失败。

com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目: com/google/android/gms/内部/测量/zzwn.class

我试图创建一个任务来删除重复项,但没有成功。

此任务:

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"
                }
            }
        }
    }
}

我的依赖:

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;
    }
}

共有1个答案

滕成双
2023-03-14

我发现react native google analytics bridge与react native onesignal之间存在冲突,我添加了dependencie compile'com.google.firebase:firebase消息:17.1.0’在应用程序/内部版本中。渐变。

我希望这能帮助别人。

 类似资料: