android - 请求位置精度插件构建错误

标签 android cordova cordova-plugins visual-studio-cordova taco

我正在为 Apache Cordova 使用 Visual Studio Tools 构建一个 Phonegap 应用

我正在尝试获取 native 对话框以将用户带到/启用位置服务,为此我正在使用来自 HERERequest 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”下安装,然后再次尝试构建。

screenshot of sdk manager

查看 repository 的更新文档后

关于android - 请求位置精度插件构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35533668/

相关文章:

Cordova inAppBrowser IOS

angular - 类型 HTTPOriginal 不可分配给类型 Provider,插件安装后 ionic 错误

android - 使用cordova将android图库中的图片分享到cordova应用程序

android - 如何将一个 View 的基线与另一个 View 的顶部对齐

android - 从 sqlite3 DB 中删除不在对象列表中的行

android - Audiomanager 扬声器不工作

android - Phonegap 地理定位插件

android - 空白页 Ionic 4 android 5.1

ios - Cordova iOS 应用程序首选项插件缓存问题

java - AlertDialog 在方法 insde 线程完成之前显示 Android Java