dpa99c/cordova-plugin-request-location-accuracy

Please fix this error of version conflict

Closed this issue · 5 comments

Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 9.0.0.

This plugin doesn't reference the google-services plugin directly, it references the Play Services Library as com.google.android.gms:play-services-location:11.+.

This plugin is probably conflicting with another that is referencing v9. Once possible solution is to install cordova-android-play-services-gradle-release into your project, which will force all plugins in the project (including this one) to use the same version of Play Services. However, as noted in #35, this will not work for some plugins which specify their Gradle dependencies in a non-standard way, namely phonegap-plugin-push and cordova-plugin-fcm.

Sir this are the plugin installed are :

com-sarriaroman-photoviewer 1.1.10 "PhotoViewer"
cordova-plugin-camera 2.4.1 "Camera"
cordova-plugin-compat 1.1.0 "Compat"
cordova-plugin-console 1.0.5 "Console"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-facebook4 1.9.1 "Facebook Connect"
cordova-plugin-fcm 2.1.2 "FCMPlugin"
cordova-plugin-file 4.3.3 "File"
cordova-plugin-file-transfer 1.6.3 "File Transfer"
cordova-plugin-filepath 1.0.2 "FilePath"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-googlemaps 2.0.0-beta3-20170830-1907 "cordova-plugin-googlemaps"
cordova-plugin-googleplus 5.1.1 "Google SignIn"
cordova-plugin-inappbrowser 1.7.1 "InAppBrowser"
cordova-plugin-nativestorage 2.2.2 "NativeStorage"
cordova-plugin-network-information 1.3.3 "Network Information"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.2 "StatusBar"
cordova-plugin-whitelist 1.3.1 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"

what can be solution for that because I m using FCM plugin what can be the solution

There is a suggested workaround here for cordova-plugin-fcm.

VRZ78 commented

Here is my fix if you're having conflict issues with cordova-plugin-fcm and cordova-plugin-request-location-accuracy

  • In cordova-plugin-fcm > plugin.xml, change
  <framework src="com.google.firebase:firebase-core:+" />
  <framework src="com.google.firebase:firebase-messaging:+" />

to

  <framework src="com.google.firebase:firebase-core:11.4.2" />
  <framework src="com.google.firebase:firebase-messaging:11.4.2" />
  • In cordova-plugin-request-location-accuracy > config.xml, change

<framework src="com.google.android.gms:play-services-location:11:+" />

to

<framework src="com.google.android.gms:play-services-location:11.4.2" />

  • Remove and add Android platform
  • In Platform > android > cordova-plugin-fcm > xxx-FCMPlugin.gradle, change

classpath 'com.google.gms:google-services:3.0.0'
to

classpath 'com.google.gms:google-services:3.2.0'

Here is a fix for the phonegap-plugin-push plugin:

  1. Remove phonegap-plugin-push plugin,

    phonegap plugin remove phonegap-plugin-push
  2. Re-add Android platform if in dependencies of platforms/android/app/build.gradle file is still present line compile "com.google.firebase:firebase-messaging:11.6.2":

    phonegap platform remove android
    phonegap platform add android@7.1
  3. Add plugin phonegap-plugin-push, this time specyfying variable which will be used for com.google.firebase:firebase-messaging dependency:

    phonegap plugin add phonegap-plugin-push --variable FCM_VERSION=11.+

    which may be found in file cordova-plugin-request-location-accurancy/plugin.xml