android - FCM token 检索失败 RST

标签 android firebase google-cloud-messaging firebase-cloud-messaging

我正在为我的应用执行从 GCM 到 FCM 的迁移。但是在设备上测试我的最终代码时,我的 Logcat 中出现以下错误,并且对 Firebase 的调用失败。

E/FirebaseInstanceId: Token retrieval failed: RST

Firebase 文档中没有“RST”的含义等信息。

谁能帮帮我?

编辑

enter image description here enter image description here

最佳答案

试试看

FirebaseInstanceId.getInstance().getToken()

同时添加

FirebaseOptions.Builder().setGcmSenderId("YOUR_SENDER_ID")

在调用 getToken 方法之前..希望对您有所帮助

关于android - FCM token 检索失败 RST,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50407629/

相关文章:

android - Android 上的 SQL 客户端

android游戏循环与渲染线程中的更新

android - VideoView MediaPlayer 错误

Firebase 自定义声明未在规则中更新

android - 关于2019年4月11日后GCM实现Android应用(GCM废除)

java - java 文件中出现意外的日志 json

Firebase Firestore : how to store and query One to Many relationships?

reactjs - 用户能否在 Chrome 中更改 Redux/Mobx 的值以获得对受限 View 的访问权限?

android - 如何使用requestSync延迟syncAdapter的执行

google-chrome - Web Push API Chrome,返回 "Unauthorized Registration"