[Android] Fcm support Default FirebaseApp is not initialized in this process
August 26, 2020
This project migrated from GCM to Firebase and you need to perform these steps:
- Setup Firebase following the 4 steps of Option 1.
- You will get a file called
google-services.json
to add to yourandroid/app
folder =>android/app/google-services.json
. - In step 4, you added
implementation 'com.google.firebase:firebase-core:16.0.8'
, replace it withimplementation "com.google.firebase:firebase-messaging:17.3.0"
instead.
Your setup should looks now like:
package.json
...
"dependencies": {
...
"react-native-notifications": "^1.5.0",
...
build.gradle
...
buildscript {
...
dependencies {
...
classpath 'com.google.gms:google-services:4.2.0'
...
app/build.gradle
...
dependencies {
...
implementation "com.google.firebase:firebase-messaging:17.3.0"
...
}
...
apply plugin: 'com.google.gms.google-services'