Cordova-plugin-googlemaps

I’m trying to update my app to the latest version of plugin-googlemaps. I was at 2.6.0 but I need 2.7.++ . This requires changing the play_services_version from 15.0.1 to 16.0.1 as is shown in the following snippet from my config.xml.

For the record, I’ve tried PLAY_SERVICES_VERSION 16.0.0 as well and with the same type of error message.

  <plugin name="cordova-plugin-googlemaps" spec="2.7.1">
    <!--
    <variable name="PLAY_SERVICES_VERSION" value="15.0.1" />
    -->
    <variable name="PLAY_SERVICES_VERSION" value="16.0.1" />
    <variable name="ANDROID_SUPPORT_V4_VERSION" value="27.1.1" />
  </plugin>

When I try building I get the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.
> In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[15.0.
  1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
  
  Dependency failing: com.google.android.gms:play-services-stats:15.0.1 -> com.google.android.gms:play-services-basement@[
  15.0.1], but play-services-basement version was 16.0.1.
  
  The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
  ifact with the issue.
  -- Project 'app' depends onto com.google.android.gms:play-services-tasks@16.0.1
  -- Project 'app' depends onto com.google.android.gms:play-services-location@16.0.0
  -- Project 'app' depends onto com.google.firebase:firebase-common@16.0.0
  -- Project 'app' depends onto com.google.firebase:firebase-iid-interop@16.0.0
  -- Project 'app' depends onto com.google.android.gms:play-services-base@16.0.1
  -- Project 'app' depends onto com.google.android.gms:play-services-maps@16.0.0
  -- Project 'app' depends onto com.google.firebase:firebase-measurement-connector@16.0.0
  -- Project 'app' depends onto com.google.android.gms:play-services-basement@16.0.1
  -- Project 'app' depends onto com.google.android.gms:play-services-stats@15.0.1
  -- Project 'app' depends onto com.google.firebase:firebase-messaging@17.0.0
  -- Project 'app' depends onto com.google.firebase:firebase-iid@16.0.0
  -- Project 'app' depends onto com.google.android.gms:play-services-places-placereport@16.0.0
  
  For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
  endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
  github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your build.gradle file.

Build ID: 66d8a58d-34ab-41f6-b647-90198ae2a774

I went into StackOverflow and searched for

resolved Google Play services library dependency depends on another at an exact version

There are a number of hits. Did you have a look at those?

No, I didn’t extract that from the error. My take away is that 16.0.1 isn’t available in the build system.

The PLAY_SERVICES_VERSION and ANDROID_SUPPORT_V4_VERSION are optional so when I remove those, I get the same error… I don’t think this is on my end.

I also found that the developer very kindly failed to document a change of the PLAY_SERVICES_VERSION from a variable to a preference that’s now called GOOGLE_PLAY_SERVICES_VERSION.

No matter which way I turn, the later version of this plugin won’t build. I rolled back to 2.6.2 and I gotta roll with that and see how far I get but most likely, I’ll need to install cordova cli locally and add the plugin manually as that sets the variables to the required level… 9 hours of work later. sigh…

There seems to be an open issue in the repo for this plugin:

There are some other ideas here too. You might try posting your problem there: it looks like an issue with the control.