react-native-firebase云通知使react-native应用程序崩溃

时间:2020-10-05 10:22:58

标签: android react-native react-native-firebase

我有问题,好几天都没有解决。当我从react-native-firebase初始化云消息时,react-native应用程序崩溃。

我认为这是版本错误。

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",

有人有什么想法吗?

0 个答案:

没有答案