When I open Android Studio the sync fails with:
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 element at AndroidManifest.xml:5:5-43:19 to override.
This happens when I add Firebase to the project. The project is Ionic 4 + Capacitor created using the following:
- ionic start testApp tabs --capacitor
- In my Firebase project I add Android - " Add Firebase to your Android app "
- Download google-services.json
- Add classpath 'com.google.gms:google-services:4.2.0 to project level build.gradle (already there so ignore this step)
- Add implementation ‘com.google.firebase:firebase-core:17.0.0’ to App Level build.gradle
- Add apply plugin: ‘com.google.gms.google-services’ to App Level build.gradle
- Click the Sync Now button cd myApp
- npx cap init testApp com.acmeinc.testApp
- ionic build
- npx cap add android
- npx cap open android
In my Firebase project I add Android - " Add Firebase to your Android app "
- Download google-services.json
- Add classpath 'com.google.gms:google-services:4.2.0 to project level build.gradle (already there so ignore this step)
- Add implementation ‘com.google.firebase:firebase-core:17.0.0’ to App Level build.gradle
- Add apply plugin: ‘com.google.gms.google-services’ to App Level build.gradle
- Click the Sync Now button
Can anyone help?
Thanks
Marc