1
我們正在使用Phonegap 3.1.0-0.15.0,並且在嘗試訪問位置信息時應用程序發生堵塞。 iOS中工作正常但是在AndroidAndroid:Phonegap 3.1.x無法加載地理位置插件
的應用程序塞滿我們使用:
navigator.geolocation.getCurrentPosition(app.location.onSuccess, app.location.onError);
,我們也嘗試:
var geo = cordova.require('cordova/plugin/geolocation');
geo.getCurrentPosition(app.location.onSuccess, app.location.onError);
的logcat中提到以下幾點:
Could not find cordova.js script tag. Plugin loading may fail. at file:///android_asset/www/phonegap.js:1511
Uncaught module cordova/plugin/geolocation not found at file:///android_asset/www/phonegap.js:56
該插件使用:
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation.git
我們做錯了什麼?
謝謝你提前
/愛德華。
您是否在您的index.html中包含了cordova腳本? – aharris88
是的cordova.js包含在內 – ECostello