离子 5 科尔多瓦 fcm 与火力

时间:2021-02-27 18:00:00

标签: android firebase cordova ionic-framework firebase-cloud-messaging

我正在尝试使用 firebase 实现 FCM,它为我的应用程序使用推送通知。我已经尝试了很多次仍然无法从 FCM 读取令牌。我哪里出错了?

代码和剪辑。

enter image description here

错误响应:

如果我在本地使用 ionic serve,则会出现以下错误和警告

enter image description here

如果我使用ionic cordova run browser,我会在登录之前进入我的应用程序

enter image description here

登录后

enter image description here

我构建了同一个应用程序并尝试对其进行远程调试,但出现以下错误

登录前

enter image description here

登录后

enter image description here

在每种情况下,错误消息都表明要安装我已经完成的 Cordova-fm 插件。

我的 package.json

enter image description here

enter image description here

我尝试删除 android 插件并将其安装,就像一个新项目不起作用,同样的错误。 我试图在一个空白的 Ionic 项目中只运行 firebase 和 fcm,仍然是同样的错误。 我试图降级版本以查看它是否有效,错误没有改变。

我已经尝试了网上的大部分建议。没有什么可以让我访问 FCM 令牌。

PS:这是我第一个使用 ionic 和 firebase 的项目。

0 个答案:

没有答案