AndroidManifest.xml:22:18-91 Error:
Hi,
When configuring the push notification in the fresh project and run the application i got this error:
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
"react-native": "0.59.9", "react-native-push-notification": "3.1.3",
I came to post about this too. Seems to be a new problem from today, due to a new gms version. Same problem is being discussed for react-native-device-info, where they already have a PR up https://github.com/react-native-community/react-native-device-info/pull/693/commits/ec930b3f61da83e46cd70ecd108e0fe7a873fcb0.
This same change makes react-native-push-notification work too, from my own testing, so hopefully that helps you for now, too.
same issue here. @mattimck I just changed the gms version in build.gradle of react-native-push-notificatoin as the link. but It didn't work. Could you explain how to apply it?
with @mattimck 's solution, I also changed firebase version to 17.6.0 and build is success. Don't know yet if it works.
FYI, PR is here https://github.com/zo0r/react-native-push-notification/pull/1092
after watching @mattimck 's solution, I changed one but it came with error 'Could not find com.google.firebase:firebase-messaging:16.1.0.' so I changed firebase version to 17.6.0, but it did not help. keeps showing same error.
implementation "com.google.android.gms:play-services-gcm:${safeExtGet('googlePlayServicesVersion', '16.1.0')}" implementation "com.google.firebase:firebase-messaging:${safeExtGet('firebaseVersion', '17.6.0')}"
Yep @pram11 , as @uropsm said, it should just be googlePlayServicesVersion that needs to be changed from + to 16.1.0. I didn't seem to need to change firebase at all, since it was already defined as a specific version, but curious how you go with it.
oh, I found I changed some before check this article. :)
I had the same situation as @uropsm - just changing googlePlayServicesVersion wasn't enough, I also needed to change the firebaseVersion.
I don't know the details well. but the problem is today's release(of firebase-messaging, play-services-gcm) started supporting andoridx. Supporting androidx causes the error.
So need to fix to previous version. com.google.firebase:firebase-messaging:17.6.0 com.google.android.gms:play-services-gcm:16.1.0
Hi,
the problem is that when we include the implementation project(':react-native-push-notification') in app/build.gradle , i already update the com.google.firebase:firebase-messaging:17.6.0 com.google.android.gms:play-services-gcm:16.1.0, but when building the app, got same issue.
thanks.
@Ethan0007 did you clean project after changing? cd /yourproject/android ./gradlew clean cd .. react-native run-android
@uropsm yes sir, i do clean,
by the way this is my app/build.gradle,

and build.gradle:

is it necessary to add play-service-base and play-service-gcm?
@uropsm but when i comment implementation project(':react-native-push-notification') my application works. but suddenly when i include it it give an same error above.
@Ethan0007 I changed node_modules/react-native-push-notification/andorid/build.gradle not my project build.gradle
I had the same situation as @uropsm - just changing
googlePlayServicesVersionwasn't enough, I also needed to change thefirebaseVersion.
Quite right - apologies for bad information above. When I got home from work, discovered I also needed to fix the firebase version 👍
@uropsm sir, where did i put node_modules/react-native-push-notification/andorid/build.gradle ?
@uropsm in app/build.gradle
you can use this
dependencies {
compile "com.google.android.gms:play-services-gcm:16.1.0"
compile "com.google.firebase:firebase-messaging:17.6.0"
compile (project(':react-native-push-notification')) {
exclude group: "com.google.android.gms", module: "play-services-gcm"
exclude group: "com.google.firebase", module: "firebase-messaging"
}
...
}
its working. thanks!
Getting this error after running yarn start (already used the listed fix):
events.js:183
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE :::8081
at Server.setupListenHandle [as _listen2] (net.js:1360:14)
at listenInCluster (net.js:1401:12)
at Server.listen (net.js:1485:7)
at Promise (/home/virtumonde/Desktop/Development/InvestmentClicker1.0 (another copy)/node_modules/metro/src/index.js:253:20)
at new Promise (<anonymous>)
at Object.<anonymous> (/home/virtumonde/Desktop/Development/InvestmentClicker1.0 (another copy)/node_modules/metro/src/index.js:252:14)
at Generator.next (<anonymous>)
at asyncGeneratorStep (/home/virtumonde/Desktop/Development/InvestmentClicker1.0 (another copy)/node_modules/metro/src/index.js:46:24)
at _next (/home/virtumonde/Desktop/Development/InvestmentClicker1.0 (another copy)/node_modules/metro/src/index.js:66:9)
at <anonymous>
error Command failed with exit code 1.
Is someone else getting this?