Android Manifest merge error
See original GitHub issueHello,
I am facing the following error:
Task :app:processDebugManifest FAILED /Users/my-user/Documents/pushproject/android/app/src/debug/AndroidManifest.xml:22:18-91 Error: 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:7:5-117 to override.
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
My OS and settings are: OS: Mac Platform: Android React Native version: 0.59.10 RN Push Notifications version: 3.1.3 Device: Moto G6 Android Pie(9.0)
Steps to reproduce:
- Install RN -v 0.59.10
- react-native run-android
- npm install --save react-native-push-notification
- react-native link react-native-push-notification
- Did not change the App.js. It was left untouched.
- react-native run-android
There is when the error occurs. Note that I did not even started to use the RN push notification module. I just installed and linked it, then
react-native run-android
to see if everything still running ok, but it is not.
Issue Analytics
- State:
- Created 4 years ago
- Comments:14
Top GitHub Comments
@mAlaliSy you saved me bro! after hours i finally could build my project but with a little bit more changes.
First: go to the ‘node_modules\react-native-push-notification\android\build.gradle’ and add these two lines:
then go to ‘Your_project_folder\android\app\build.gradle’ and replace
implementation project('react-native-push-notification')
withAfter hours and hours and a lot of attempts, this is what worked so far. In
android/app/build.gradle
use:dependencies {
implementation(project(":react-native-push-notification"), {
exclude group: "com.google.android.gms" exclude group: "com.google.firebase" })
}
In
android/build.gradle
use:ext{ ...
googlePlayServicesVersion = "16.0.0"
firebaseVersion = "17.3.4"
... }