Reputation: 621
I am working on an ionic project. I am trying to make a build using 'ionic cordova build android'. Until last night I was able to make the build easily. But since, this morning I am getting error below. I have tried solution available online for android native. But it's not working. Please help.
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-31:19 to override.
Upvotes: 2
Views: 3268
Reputation: 621
The problem occurred because if you are using android firebase dependencies in your project then you need to migrate into androidx. This can be done easily using Android Studio but I am developing my project using VS Code.
I tried running below given commands and the bug got fixed:
ionic cordova plugin add cordova-plugin-androidx
ionic cordova plugin add cordova-plugin-androidx-adapter
Upvotes: 1