简体   繁体   English

将senderID添加到react-native-push-notification配置时,react本地应用程序立即崩溃

[英]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.

相关问题 使用 react-native-push-notification,App 在收到新的 FCM 通知时崩溃 - Using react-native-push-notification, App crashes when receiving new FCM notification 当应用程序在后台并单击通知时,Android react-native-push-notification onNotification 没有被调用? - Android react-native-push-notification onNotification not called when app is in the background and notification clicked? 当 android 应用程序被杀死时,react-native-push-notification 自定义声音不起作用 - react-native-push-notification custom sound not working when android app is killed 使用 react-native-push-notification 删除以前的通知 - Delete previous notification(s) using react-native-push-notification 添加 React-Native-Camera 和 React-Native-Push-Notification 后无法构建 React Native - Can't build React Native after add React-Native-Camera and React-Native-Push-Notification “ react-native-push-notification”包在Android上导致多个dex调试错误 - “react-native-push-notification” package causing multiple dex debug error on android 如何在Android上用react-native-push-notification获取所有通知,相当于PushNotificationIOS getDeliveredNotifications? - How to get all notifications with react-native-push-notification on Android, equivalent to PushNotificationIOS getDeliveredNotifications? React Native Android App 在收到 FCM 通知时崩溃 - React Native Android App crashes when receiving FCM notification React Native 中的推送通知 - Push Notification In React Native 单击推送通知时,React本机应用程序进入后台 - React native app goes to background when clicked on push notification
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM