Closed anatoly-spb closed 6 years ago
Solution is here https://stackoverflow.com/a/49200782/4423449
@radulescuandrew I have added android-gradle-support:
ionic cordova plugin add cordova-android-support-gradle-release
and build finished successfully.
But my application cannot communicate with FCM anymore: SERVICE_NOT_AVAILABLE:
03-22 17:08:10.394 5302-5319/ru.rlisystems.mobile.rms E/FirebaseInstanceId: Token retrieval failed: SERVICE_NOT_AVAILABLE
03-22 17:08:22.565 5302-5370/ru.rlisystems.mobile.rms E/dalvikvm: Could not find class 'android.app.NotificationChannel', referenced from method com.adobe.phonegap.push.PushPlugin.createChannel
03-22 17:08:22.716 5302-5385/ru.rlisystems.mobile.rms E/Push_Plugin: execute: Got IO Exception SERVICE_NOT_AVAILABLE
03-22 17:09:10.462 5302-5319/ru.rlisystems.mobile.rms E/FirebaseInstanceId: Token retrieval failed: SERVICE_NOT_AVAILABLE
03-22 17:11:10.529 5302-5319/ru.rlisystems.mobile.rms E/FirebaseInstanceId: Token retrieval failed: SERVICE_NOT_AVAILABLE
This is no longer related to your initial question. And I can't debug right now but you can try:
cordova platform rm android
cordova platform add android
Also take a look here: https://github.com/ionic-team/ionic-cloud-angular/issues/37
@radulescuandrew unfortunately android platform removing/adding does not help.
I have reverted to phonegap-plugin-push@2.1.2
with FCM_VERSION=11.0.1
and now everything works fine:
ionic cordova plugin remove phonegap-plugin-push
ionic cordova plugin add phonegap-plugin-push@2.1.2 --variable SENDER_ID=XXXXXX --FCM_VERSION=11.0.1
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 Ionic, please create a new issue and ensure the template is fully filled out.
Ionic version: (check one with "x") (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1) [ ] 2.x [x ] 3.x [ ] 4.x
I'm submitting a ... (check one with "x") [x] bug report [ ] feature request
Current behavior: during build android I get:
Expected behavior: I expect that I have no error.
Steps to reproduce:
Related code:
Other information:
config.xml:
package.json:
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):