android– 添加Firebase核心版本17.0.0后,Manifest合并失败

android– 添加Firebase核心版本17.0.0后,Manifest合并失败,第1张

概述我在我的项目中添加了firebasecrashlytics依赖项,之后项目没有构建.https://firebase.google.com/docs/crashlytics/get-started?authuser=0&platform=android#android你能告诉我可能做错了什么吗?谢谢[R在这些方面构建失败implementation"com.google.android.gms:play-ser

我在我的项目中添加了firebase crashlytics依赖项,之后项目没有构建.

https://firebase.google.com/docs/crashlytics/get-started?authuser=0&platform=android#android

你能告诉我可能做错了什么吗?

谢谢
[R

在这些方面构建失败

implementation "com.Google.androID.gms:play-services-base:17.0.0"implementation 'com.Google.firebase:firebase-core:17.0.0'

这是错误日志

Task :app:processDeBUGManifest FailedC:\Development\xxx\xxx-app\androID\app\src\main\AndroIDManifest.xml:22:18-91 Error:    Attribute application@appComponentFactory value=(androID.support.v4.app.CoreComponentFactory) from [com.androID.support:support-compat:28.0.0] AndroIDManifest.xml:22:18-91    is also present at [androIDx.core:core:1.0.0] AndroIDManifest.xml:22:18-86 value=(androIDx.core.app.CoreComponentFactory).    Suggestion: add 'tools:replace="androID:appComponentFactory"' to <application> element at AndroIDManifest.xml:7:5-35:19 to overrIDe.See http://g.co/androIDstudio/manifest-merger for more information about the manifest merger.FAILURE: Build Failed with an exception.* What went wrong:Execution Failed for task ':app:processDeBUGManifest'.> Manifest merger Failed : Attribute application@appComponentFactory value=(androID.support.v4.app.CoreComponentFactory) from [com.androID.support:support-compat:28.0.0] AndroIDManifest.xml:22:18-91    is also present at [androIDx.core:core:1.0.0] AndroIDManifest.xml:22:18-86 value=(androIDx.core.app.CoreComponentFactory).    Suggestion: add 'tools:replace="androID:appComponentFactory"' to <application> element at AndroIDManifest.xml:7:5-35:19 to overrIDe.* Try:Run with --stacktrace option to get the stack trace. Run with --info or --deBUG option to get more log output. Run with --scan to get full insights.* Get more help at https://help.gradle.orgDeprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.See https://docs.gradle.org/4.8/userguIDe/command_line_interface.HTML#sec:command_line_warningsBUILD Failed in 3s72 actionable tasks: 70 executed, 2 up-to-date

Gradle依赖项:

dependencIEs {    compile project(':react-native-vector-icons')    compile filetree(dir: "libs", include: ["*.jar"])    compile "com.androID.support:appcompat-v7:28.0.0"    compile "com.androID.support:support-media-compat:28.0.0"    compile "com.androID.support:support-v4:28.0.0"    compile "com.facebook.react:react-native:+"  // From node_modules    compile project(':react-native-localization')    compile project(':realm')    compile project(':react-native-keychain')    compile project(':react-native-device-info')    compile project(':react-native-sensitive-info')    compile project(':react-native-fs')    implementation project(':react-native-firebase')    implementation "com.Google.androID.gms:play-services-base:17.0.0"    implementation 'com.Google.firebase:firebase-core:17.0.0'    implementation 'com.crashlytics.sdk.androID:crashlytics:2.10.1'    //compile project(':react-native-secure-key-store')}

Gradle:

buildscript {    repositorIEs {        Google()        jcenter()        maven {            url 'https://maven.fabric.io/public'        }    }    dependencIEs {        classpath 'com.androID.tools.build:gradle:3.1.3'        //classpath 'com.Google.gms:Google-services:3.0.0'        classpath 'com.Google.gms:Google-services:4.2.0'        classpath 'io.fabric.tools:gradle:1.29.0'  // Crashlytics plugin        // NOTE: Do not place your application dependencIEs here; they belong        // in the indivIDual module build.gradle files    }}ext {    compileSdkVersion = 28    buildToolsversion = "28.0.0"    minSdkVersion = 23    targetSdkVersion = 28    }allprojects {    repositorIEs {        mavenLocal()        Google()        jcenter()        maven {            // All of React Native (Js, Obj-C sources, AndroID binarIEs) is installed from npm            url "$rootDir/../node_modules/react-native/androID"        }    }}

Gradle属性:

androID.useDeprecatedndk=trueandroID.enableAapt2=falseandroID.useandroidX=falseandroID.enableJetifIEr=false

解决方法:

问题是最新的firebase依赖项被迁移到androIDx.因此,一个修复是将您的项目迁移到androIDx,请参阅migrate to androidx(我更喜欢,因为所有新升级都使用androIDx).否则,您可以将firebase-core依赖项降级到以下版本

implementation 'com.Google.firebase:firebase-core:16.0.9'
总结

以上是内存溢出为你收集整理的android – 添加Firebase核心版本17.0.0后,Manifest合并失败全部内容,希望文章能够帮你解决android – 添加Firebase核心版本17.0.0后,Manifest合并失败所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/web/1099519.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-28
下一篇2022-05-28

发表评论

登录后才能评论

评论列表(0条)

    保存