gpt4 book ai didi

android - 尝试添加包时出现错误 "duplicate entry: com/google/android/gms/internal/zzble.class"

转载 作者:IT老高 更新时间:2023-10-28 23:33:03 27 4
gpt4 key购买 nike

我正在尝试将 react-native-firestack 包添加到我的应用程序中。但它不断给出以下错误:

:app:mergeDebugResources UP-TO-DATE
:app:recordFilesBeforeBundleCommandDebug
:app:bundleDebugJsAndAssets SKIPPED
:app:generateBundledResourcesHashDebug
4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources UP-TO-DATE
: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/internal/zzble.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: 2.498 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment.
Go to https://facebook.github.io/react-native/docs/getting-started.html
and check the Android tab for setup instructions.

我尝试在几个包中将一些包添加到 exclude group 中。但没有一个奏效。这是 ./gradlew clean :app:dependencies 结果:https://gist.github.com/THPubs/8fe8b4b9c80e3c6cd49541d66887c742

尝试关注其他类似的堆栈溢出问题,但看起来这个包有很多依赖项。我找不到冲突。

我的 build.gradle 依赖项:

dependencies {
compile(project(":react-native-firestack"))
compile project(':react-native-onesignal')
compile project(':react-native-fbsdk')
compile project(':react-native-share')
compile project(':react-native-video')
compile project(':react-native-uuid-generator')
compile project(':react-native-udp')
compile project(':react-native-tcp')
compile project(':react-native-camera')
compile project(':react-native-contacts')
compile project(':react-native-linear-gradient')
compile project(':react-native-vector-icons')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
compile project(':react-native-image-picker')
compile(project(":react-native-google-signin")){
exclude group: "com.google.android.gms" // very important
}
compile 'com.google.android.gms:play-services-auth:10.2.0'
compile 'com.google.firebase:firebase-crash:10.0.1'
}

最佳答案

确保您在所有 google play 服务库中使用相同的版本:例如:

     compile "com.google.firebase:firebase-core:$project.ext.googlePlayServicesVersion"
compile "com.google.firebase:firebase-auth:$project.ext.googlePlayServicesVersion"
compile "com.google.firebase:firebase-database:$project.ext.googlePlayServicesVersion"

project.ext {
googlePlayServicesVersion = '10.2.0'
}

关于android - 尝试添加包时出现错误 "duplicate entry: com/google/android/gms/internal/zzble.class",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42580096/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com