繁体   English   中英

添加实现 'com.google.firebase:firebase-analytics:17.2.2' 使实现 'com.android.support:appcompat-v7:28.0.0' 用红色下划线

[英]adding implementation 'com.google.firebase:firebase-analytics:17.2.2' make implementation 'com.android.support:appcompat-v7:28.0.0' underlined in red

After creating an application and a project on Firebase and downloading google-service.json and placing it in the app repository everything is fine until I try to add any firebase service SDK and after syncing I get the following line:

实现 'com.android.support:appcompat-v7:28.0.0' 带有红色下划线和以下错误

ERROR: 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: 5: 5-19: 19 to override.

您必须将您的项目迁移到 androidX,请按照下列步骤操作:

Refactor -> Refactor this -> Migrate To AndroidX -> (将弹出一条消息询问您是否要备份项目,由您决定)-> Do Refactor -> 项目将同步你对 go 很好。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM