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:
implementation 'com.android.support:appcompat-v7:28.0.0' underlined with red and the following error
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.
You have to migrate your project to androidX, Follow these steps:
Refactor -> Refactor this -> Migrate To AndroidX -> ( a message will pop up to ask if you want to back up your project, it is up to you to do that or not ) -> Do Refactor -> the project will sync and you re good to go.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.