[英]react native app instantly crashes when adding senderID to react-native-push-notification configure
react-native-push-notification works fine when calling PushNotification.configure()
without senderID
however, when adding it, the app closes with no log. 在不使用
senderID
情况下调用PushNotification.configure()
时,react-native-push-notification可以正常工作,但是在添加它时,应用程序关闭且没有日志。
platform: android (real device) 平台:Android(真实设备)
react-native-push-notification: ^3.0.2 react-native-push-notification:^ 3.0.2
react-native: 0.49.3 反应本机:0.49.3
I tried try catch
and tried sentry, both did not catch the error 我
try catch
并尝试了哨兵,但都没有抓住错误
The problem was that I was using an incompatible version of play-services-gcm. 问题是我使用了不兼容的play-services-gcm版本。
so I just changed force=true
to force=false
in app/build.gradle
所以我只是在
app/build.gradle
force=true
更改为force=false
compile ('com.google.android.gms:play-services-gcm:8.1.0') {
force = false; <== Here
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.