描述:

我今天使用一个信号为我的Android应用程序,我已经设置了一切,我尝试使用仪表板向我发送消息 . 只要收到通知但消息通过,应用程序就会崩溃 . onesignal_message

Environment:

一个信号版本:“^ 3.2.5”

我如何安装:npm install --save react-native-onesignal

Steps to reproduce:

1.安装一个信号

2.根据文档设置一切

  • 从一个信号仪表板发送消息以测试用户

This is my app/build.gradle

dependencies {
compile project(':react-native-onesignal')
implementation project(':react-native-firebase')

implementation "com.google.android.gms:play-services-base:15.0.1"
implementation "com.google.firebase:firebase-core:16.0.1"
implementation "com.google.firebase:firebase-auth:16.0.2"
implementation('com.crashlytics.sdk.android:crashlytics:2.9.4@aar') {
    transitive = true
}

compile project(':react-native-svg')

compile project(':react-native-push-notification')
compile('com.google.android.gms:play-services-gcm:15.0.1') {
    force = true;
}

implementation project(':react-native-vector-icons')
compile project(':react-native-fbsdk')

implementation(project(':react-native-google-signin')) {
    exclude group: "com.google.android.gms"
}
implementation project(':react-native-splash-screen')

implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:23.0.1"
implementation "com.facebook.react:react-native:+"  // From node_modules

implementation(project(':react-native-maps')) {
    exclude group: 'com.google.android.gms', module: 'play-services-base'
    exclude group: 'com.google.android.gms', module: 'play-services-maps'
}
implementation 'com.google.android.gms:play-services-base:15.0.1'
implementation 'com.google.android.gms:play-services-maps:15.0.1'

implementation(project(":react-native-google-signin")) {
    exclude group: "com.google.android.gms" // very important
}

implementation 'com.google.android.gms:play-services-auth:15.0.1'
}
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply plugin: 'com.google.gms.google-services'
apply plugin: "com.android.application"
apply plugin: "io.fabric"

com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true

This is my crash stacktrace:

07-25 16:31:06.253 9371-9371 / com.instantpark E / AndroidRuntime:FATAL EXCEPTION:main进程:com.instantpark,PID:9371 java.lang.NoSuchMethodError:无静态方法zzad()Lcom / google / firebase / IID / zzan;在课堂Lcom / google / firebase / iid / zzan;或com.google.firebase.messaging.FirebaseMessagingService上的超级类('com.google.firebase.iid.zzan'声明出现在/data/app/com.instantpark-30SSLbAs-W25EJfn2GWZDg==/base.apk中) . 来自android.app.ActivityThread.-wrap20的android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3488)的com.google.firebase.iid.zzb.onStartCommand(未知来源:12)的zzb(未知来源:0) Unknown来源:0)android.app.A活动上的android.app.A.运行时,Android.O.Roler.Mopage(Handler.java:106)的android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1704)(Looper.java: 172)在android.app.ActivityThread.main(ActivityThread.java:6590)at java.lang.reflect.Method.invoke(Native Method)at com.android.internal.os.RuntimeInit $ MethodAndArgsCaller.run(RuntimeInit.java: 438)在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)