question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android Manifest merge error

See original GitHub issue

Hello,

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:

  1. Install RN -v 0.59.10
  2. react-native run-android
  3. npm install --save react-native-push-notification
  4. react-native link react-native-push-notification
  5. Did not change the App.js. It was left untouched.
  6. 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:closed
  • Created 4 years ago
  • Comments:14

github_iconTop GitHub Comments

15reactions
AmirHediehcommented, Aug 9, 2019

@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:

def DEFAULT_GOOGLE_PLAY_SERVICES_VERSION = "+"
def DEFAULT_FIREBASE_MESSAGING_VERSION = "+"

then go to ‘Your_project_folder\android\app\build.gradle’ and replace implementation project('react-native-push-notification') with

compile (project(':react-native-push-notification')) {
        exclude group: "com.google.android.gms", module: "play-services-gcm"
        exclude group: "com.google.firebase", module: "firebase-messaging"
 }
5reactions
nos-joelcommented, Jul 30, 2019

After 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" ... }

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manifest Merger failed with multiple errors in Android Studio
Usually occurs when you have errors in your manifest.Open AndroidManifest.xml .Click on the merged manifest tab.
Read more >
Manifest Merger Fails with Multiple Errors in Android Studio
A merge conflict occurs while merging whenever the value of any attribute is different in the two Manifest files. However, if an element...
Read more >
manifest merger failed with multiple errors see logs - Edureka
The initial process would be to open the manifest application known as the AndroidManifest.xml and then click on the Merged Manifest tab below ......
Read more >
Manage manifest files - Android Developers
This creates a manifest merge error. The two manifest elements cannot differ at all in strict mode. So you must apply other merge...
Read more >
Manifest merger failed with multiple errors, see logs #34821
Anyone knows why I am getting this error: Apps targeting Android 12 and higher are required to specify an explicit value for android:exported...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found