Я пытаюсь добавить пакет 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'
}