如何使设备令牌扑来

发布于 2025-02-10 00:24:23 字数 409 浏览 0 评论 0原文

我正在尝试从此代码中获取设备令牌,

FirebaseMessaging.instance.getToken().then((value) => print("token is $value"));

当我在模拟器上运行该应用时,它会打印令牌,但是当我在物理设备上运行应用程序时,它会给我这个错误,

java.util.concurrent.ExecutionException: com.google.firebase.installations.FirebaseInstallationsException: Firebase Installations Service is unavailable. Please try again later.

请帮助如何修复它。

I'm trying to get the device token from this code

FirebaseMessaging.instance.getToken().then((value) => print("token is $value"));

it prints the token when i run the app on emulator, but it gives me this error when i run the app on physical device

java.util.concurrent.ExecutionException: com.google.firebase.installations.FirebaseInstallationsException: Firebase Installations Service is unavailable. Please try again later.

please help how to fix it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

姐不稀罕 2025-02-17 00:24:23

有关设备信息:

集成此插件: device_info_plus: ^4.0.0.0

For Device Info:

Integrate this plugin:device_info_plus: ^4.0.0

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文