react-native app crashes with react-native-firebase cloud notification

504 views Asked by At

I have a problem and I haven't solved for days. When I initialize a cloud message from react-native-firebase, react-native app crashes.

I think it is a version error.

at: android/app/build.gradle

dependencies {
  implementation project(':react-native-firebase')
  implementation "com.google.firebase:firebase-core:16.0.9"
  implementation 'com.google.firebase:firebase-messaging:20.2.3'
  implementation 'com.google.firebase:firebase-iid:20.2.1'
  implementation "com.google.android.gms:play-services-base:16.1.0"
}

at: android/build.gradle

buildscript {
ext {
    googlePlayServicesAuthVersion = "15.0.1" // <--- use this version or newer
    buildToolsVersion = "28.0.3"
    minSdkVersion = 16
    compileSdkVersion = 28
    targetSdkVersion = 29
    supportLibVersion = "28.0.0"
    googlePlayServicesVersion = "16.+"
    firebaseVersion ="17.3.4"
    firebaseMessagingVersion = "20.2.3"
}
repositories {
    google()
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.4.0'
    classpath 'com.google.gms:google-services:4.2.0'
    classpath 'com.google.firebase:firebase-plugins:1.1.5'
}

}

at: package.json

"react-native-firebase": "^5.6.0",

Does anyone have any ideas what might be?

0

There are 0 answers