Closed kelvindart closed 6 years ago
Hi,
There is no strict requirement on using 'com.google.android.gms:play-services-gcm:11.2.0'. You can change it with 'com.google.android.gms:play-services-gcm:11.+' to solve this conflict.
I have this same error having just updated the plugin to 7.0.7 (and I also use the background geolocation plugin, albeit it from cordova-plugin-mauron85-background-geolocation). However, if I remove both of those plugins the build still fails, and changing the gradle files didn't seem to do anything. I'm guessing something else broke, but just FYI!
I got this working by editing plugins/pushwoosh-cordova-plugin/plugin.xml. In the various
<framework src="com.google.android.gms:play-services-location:11.+" />
I then removed and re-added the plugin, and everything compiles. I haven't actually checked whether it works but from what wfhm said I suspect it does.
In case anyone else hits this, my other issue seemed to be related to cordova-plugin-compat. Removing it and re-adding it fixed it.
Your Environment
cordova -v
): 6.5.0cordova platform ls
): 6.2.3Expected Behavior
For the plugin to build regardless of the GMS services specified.
Actual Behavior
There is a clash when using this plugin in combination with .
I am aware this is not a specific plugin problem, and I do not know who is correct. However, I am raising a bug to both plugin developers, in order to gain the knowledge.
There has been an update to Google Mobile Services (GMS) which is now at 11.4.0: https://developers.google.com/android/guides/releases. In the Background Geolocation's project's
build.gradle
, there is a loose version ofcom.google.android.gms:play-services-location:11.+
specified, so naturally the project will try to compile using the latest version available, 11.4.0 in this instance.However, PushWoosh explicitly set their required version to 11.2.0: https://github.com/Pushwoosh/pushwoosh-phonegap-plugin/blob/d374af1c92e3b9cb15e444f580906d311633eedf/plugin.xml#L254
This then results in a build error when trying to execute the Gradle task
transformClassesWithDexForDebug
:I am unsure whether there is a config setting I can pass to set this. Is this possible?
Workaround The workaround at the moment is to navigate to
{project}-build.gradle
, and modify the following line:to:
Steps to Reproduce
cordova create MyApp && cd MyApp
cordova platform add android
cordova plugin add pushwoosh-cordova-plugin@7.0.7
cordova plugin add cordova-background-geolocation-lt@2.8.5
cordova build android
Context
As above.
Debug logs
A screenshot of my Android SDK installation is as follows: