Closed TayKara closed 5 years ago
Did you add the google-services.json file to your app?
It was indeed the problem ! I putted my google-services.json file in the wrong directory. For the ones who want to know, google-services.json file has to be add in ./android/app/ and the package name of your project has to be the same as the package name in your google-services.json
EDIT : I no longer have an error, but I can't register. Nothing is happening when I do :
PushNotifications.register(); PushNotifications.addListener('registration', (token: PushNotificationToken) => { console.log('token ' + token.value); });
EDIT 2 : forgot to activate wifi, forgive my idiocy...
Many thanks @jcesarmobile ! :)
You need to add google-services.json file to yourapp/android/app/ not simply to yourapp/
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.
Description of the problem: I can't use Push Notifications plugin, it causes error in execution. The only thing I did was to create an Ionic project (ionic start testNotifications blank --capacitor), init cap, and modified home.page.ts and then build/open in android studio.
In home.page.ts :
The error I have in Android Studio (when executing in my phone (Honor 9 Lite - Android 8.0.0) connected by USB in debug mode :
Am I doing something something wrong, or am I missing a step to make it works ? Affected platform
OS of the development machine
Capacitor version: 1.0.0-beta.19
node version: v10.15.1
npm version: 6.7.0