android - $cordovaGeolocation.getCurrentPosition 上的 "Illegal Access"

标签 android cordova geolocation ngcordova

使用 cordova-plugin-geolocation 我在 Android 上遇到这个错误:

PositionError {code: 1, message: "Illegal Access"}

我检查了 plugins/android.json 文件并且存在权限

{
  "xml": "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" />",
  "count": 1
},
{
  "xml": "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" />",
  "count": 1
 }

最佳答案

不知何故,它只是通过做修复了

cordova plugin rm cordova-plugin-geolocation

cordova plugin add cordova-plugin-geolocation

关于android - $cordovaGeolocation.getCurrentPosition 上的 "Illegal Access",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36592956/

相关文章:

android - 如何从android中的一个联系人检索多个电话号码

android - Intent.setClass错误

JAVA HOME PATH 在环境中正确设置,但通过 Node.js 编译时错误

android - Android5.0中如何使用camera2 API实时获取每一帧数据

android - 将自定义身份验证提供程序与 Firebase 相关联

jquery - 在 Jquery Mobile 或 PhoneGap 中禁用自动旋转

javascript - 通过 AngularJS 从外部 URL 获取文本

c# - 彼此靠近的 Lat、Long 簇

ios - 如果我的应用程序在其各种 View Controller 中使用位置管理器,我应该在哪里实例化它?

javascript - 如何防止从客户端向服务器端发送数据(位置、纬度和经度)时作弊?