在我的应用程序implementation 'com.google.firebase:firebase-core:17.0.0'
文件中添加apply plugin: 'com.google.gms.google-services'
和build.gradle
后尝试构建我的应用程序时出现错误
我已经使用com.android.tools.build:gradle:3.4.0
和compileSdkVersion = 28
行
我将这些行放在我的项目build.gradle
文件中。在放置这些线之前,我可以构建项目
我收到的错误消息:
`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 element at AndroidManifest.xml:13:5-354:19 to override.
最佳答案
经过研究,我得到了这个。
我更新了我的应用程序以使用Jetpack(AndroidX),方法是将以下两行添加到项目根目录中的android.useAndroidX=true
文件中:android.enableJetifier=true
和gradle.properties
关于firebase - 实现 'com.google.firebase:firebase-core:17.0.0'并应用插件后出现错误: 'com.google.gms.google-services',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56794568/