I\'m using this with ionic 2 on Windows for Android. When I add cordova-plugin-fcm plugin, I cannot build the project anymore. Here is the error that I\'m getting:
I solved it.
plugings:
https://github.com/mauron85/cordova-plugin-background-geolocation
https://github.com/fechanique/cordova-plugin-fcm
1). remove platform: cordova platform rm android.
2). modify: plugins/cordova-plugin-fcm/src/android/FCMPlugin.gradle
replace:
apply plugin: com.google.gms.googleservices.GoogleServicesPlugin
with:
ext.postBuildExtras = {
apply plugin: com.google.gms.googleservices.GoogleServicesPlugin
}
3) add platform: cordova platform add android.
4) modify: platforms/android/project.properties
change the "+" for "11.4.2":
com.google.firebase:firebase-core:+
com.google.firebase:firebase-messaging:+
com.google.android.gms:play-services-location:+
should look like this:
com.google.firebase:firebase-core:11.4.2
com.google.firebase:firebase-messaging:11.4.2
com.google.android.gms:play-services-location:11.4.2
that's all :).