Note:its和离子型(电容)项目,我正在使用Android进行测试。
requestNotificationsPermissions(): void {
PushNotifications.requestPermission().then(result => {
if (result.granted) {
PushNotifications.register();
}
}).catch((err: any) => {
console.log(err);
});
}发布于 2021-09-15 09:20:12
我看你在用PushNotifications。
当我忘记在我的Android项目文件夹中包含google-services.json时,我经常会遇到这种情况。如果是这样的话,请将google-services.json包含在android/app/文件夹中。
见官方插件文档:https://capacitorjs.com/docs/apis/push-notifications#android
https://stackoverflow.com/questions/69189288
复制相似问题