当我 运行 在 Android 模拟器上构建时,Ionic 应用程序在登录后崩溃
Ionic App is crashing after login, when I run build on Android emulator
注意:它和离子(电容器)项目,我正在使用 Android Studio 进行测试。
requestNotificationsPermissions(): void {
PushNotifications.requestPermission().then(result => {
if (result.granted) {
PushNotifications.register();
}
}).catch((err: any) => {
console.log(err);
});
}
我看到你正在使用 PushNotifications
。
当我忘记将 google-services.json
包含在我的 Android 项目文件夹中时,它曾经发生在我身上。如果是这种情况,请将 google-services.json
包含在 android/app/
文件夹中。
查看官方插件文档:https://capacitorjs.com/docs/apis/push-notifications#android
注意:它和离子(电容器)项目,我正在使用 Android Studio 进行测试。
requestNotificationsPermissions(): void {
PushNotifications.requestPermission().then(result => {
if (result.granted) {
PushNotifications.register();
}
}).catch((err: any) => {
console.log(err);
});
}
我看到你正在使用 PushNotifications
。
当我忘记将 google-services.json
包含在我的 Android 项目文件夹中时,它曾经发生在我身上。如果是这种情况,请将 google-services.json
包含在 android/app/
文件夹中。
查看官方插件文档:https://capacitorjs.com/docs/apis/push-notifications#android