[英]Expo Push Notifications: “Error: Couldn't get GCM token on device.”
I'm trying to receive push notifications with my Expo app, but at this line, the aforementioned error is thrown:我正在尝试使用我的 Expo 应用程序接收推送通知,但在这一行,会引发上述错误:
token = await Notifications.getExpoPushTokenAsync();
I already tried:我已经尝试过:
expo push:android:upload --api-key <token>
设置 FireBase 帐户并将服务器 API 密钥与expo push:android:upload --api-key <token>
google-services.json
, linking it in app.json
and making sure that android.package is set to the correct value下载google-services.json
,将其链接到app.json
并确保 android.ZEFE90A8E604A7C847D8 设置为正确expo login
使用expo login
到我的 expo 帐户Unfortunately, nothing worked and I'm running out of ideas.不幸的是,没有任何效果,我的想法已经不多了。 Any suggestions?有什么建议么?
Okay, I just solved it by upgrading Expo to version 3.17.24
.好的,我刚刚通过将 Expo 升级到版本3.17.24
解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.