Reputation: 359
Hi in my Cordova project(Ionic v1) I'm using a background-location plugin for location tracking. The plugin working fine when I run alone but I also need the Cordova plugin cordova-plugin-fcm for GCM. Now when I run my project I'm getting this error.
Installed plugins
<plugin name="cordova-plugin-actionsheet" spec="2.3.3" />
<plugin name="cordova-plugin-camera" spec="2.4.1" />
<plugin name="cordova-plugin-compat" spec="1.1.0" />
<plugin name="cordova-plugin-console" spec="~1.0.3" />
<plugin name="cordova-plugin-device" spec="~1.1.2" />
<plugin name="cordova-plugin-fcm" spec="^2.1.2" />
<plugin name="cordova-plugin-fcm-with-dependecy-updated" spec="^2.2.1" />
<plugin name="cordova-plugin-file" spec="4.3.3" />
<plugin name="cordova-plugin-file-transfer" spec="1.6.3" />
<plugin name="cordova-plugin-filepath" spec="1.0.2" />
<plugin name="cordova-plugin-inappbrowser" spec="https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git" />
<plugin name="cordova-plugin-mauron85-background-geolocation" spec="2.2.5" />
<plugin name="cordova-plugin-media" spec="2.4.1" />
<plugin name="cordova-plugin-splashscreen" spec="~3.2.2" />
<plugin name="cordova-plugin-statusbar" spec="~2.1.3" />
<plugin name="cordova-plugin-whitelist" spec="~1.2.2" />
<plugin name="cordova-plugin-x-socialsharing" spec="5.1.8" />
<plugin name="es6-promise-plugin" spec="4.1.0" />
<plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
Upvotes: 2
Views: 2016
Reputation: 655
There is a problem with the mauron85-background-geolocation. It sets the com.google.android.gms package to a version that is incompatible with google-services plugin. I could build my app successfully by changing the platforms/android/build.gradle line
compile "com.google.android.gms:play-services-location:+"
to
compile "com.google.android.gms:play-services-location:11.0.1"
after that I run my app directly in android studio because the cordova run command overwrite this change.
I will try to find a way to fix it directly via cordova and edit this answer.
Upvotes: 1