Search code examples
androidcordovacordova-pluginsvisual-studio-cordovataco

Build Error with Request Location Accuracy Plugin


I am building a Phonegap app using Visual Studio Tools for Apache Cordova.

I am trying to get a native dialog to take user to / enable location services and for the same I am using the Request Location Accuracy Plugin from HERE.

However when I add that plugin from GIT, I get the below build error and I am unable to build the project.

1>  FAILURE: Build failed with an exception.
1>
1>  * What went wrong:
1>  A problem occurred configuring root project 'android'.
1>  > Could not resolve all dependencies for configuration ':_debugCompile'.
1>     > Could not find any version that matches com.google.android.gms:play-services-location:+.
1>       Searched in the following locations:
1>           https://repo1.maven.org/maven2/com/google/android/gms/play-services-location/maven-metadata.xml
1>           https://repo1.maven.org/maven2/com/google/android/gms/play-services-location/
1>       Required by:
1>           :android:unspecified
1>

The config.xml shows the plugin installed as below statement is present in the config.xml.

  <plugin name="cordova-plugin-request-location-accuracy" version="1.0.1" />

Any Help would be greatly appreciated.

PS - I have already enabled Google Play services in the SDK Manager.


Solution

  • Added another "EXTRA" and now it builds successfully. Looks like we also need to add "Android Support Repository" which in the latest versions of SDK manager is known as "Local Maven Repository for Support Libraries".

    Once I added that, it worked fine and I can build the application perfectly.