我正在为 Apache Cordova
使用 Visual Studio Tools
构建一个 Phonegap 应用
。
我正在尝试获取 native 对话框以将用户带到/启用位置服务,为此我正在使用来自 HERE 的 Request Location Accuracy Plugin
.
但是,当我从 GIT
添加该插件时,出现以下构建错误并且无法构建项目。
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>
config.xml
显示安装的插件,因为 config.xml
中存在以下语句。
<plugin name="cordova-plugin-request-location-accuracy" version="1.0.1" />
任何帮助将不胜感激。
PS - 我已经在 SDK Manager
中启用了 Google Play
服务。
最佳答案
我在github
上提出了这个问题repository cordova-plugin-request-location-accuracy
和 Dave Alden 先生立即做出了回应。他更新了项目的 README
。
IMPORTANT: This plugin depends on the Google Play Services library, so you must install the "Google Repository" package under the "Extras" section in Android SDK Manager. Otherwise the build will fail.
如果您还没有安装“Google Repository”,请在您的 SDK 管理器的“Extras”下安装,然后再次尝试构建。
查看 repository 的更新文档后
关于android - 请求位置精度插件构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35533668/