2

I am using Phone Gap to develop an app in Android. While deploying the app on emulator, I am getting this error logs

01-25 12:41:13.773: D/PhoneGapLog(491): Failed to run constructor: ReferenceError: Can't find variable: PluginManager
01-25 12:41:13.773: D/PhoneGapLog(491): file:///android_asset/www/phonegap-1.3.0.js: Line 210 : Failed to run constructor: ReferenceError: Can't find variable: PluginManager
01-25 12:41:13.773: I/Web Console(491): Failed to run constructor: ReferenceError: Can't find variable: PluginManager at file:///android_asset/www/phonegap-1.3.0.js:210

Even though my application works, then also the errors comes.

My .js file is

function GpsDetactionPlugin() {
};

GpsDetactionPlugin.prototype.checkGPS = function(suc,fail) {

 return PhoneGap.exec(suc, fail, "GpsDetactionPlugin", "gpsDetect", [null]);
};

PhoneGap.addConstructor(function() {
    PhoneGap.addPlugin("gpsDetaction", new GpsDetactionPlugin());
});

Why am i getting this unnecessary error log.How to stop it?

4

1 に答える 1

1

JS コードは問題ないように見えますが、問題は別の場所にあると思われます。次の場所にサンプル phonegap プラグインがあり、すべての構成が正しいことを確認できます。プラグイン情報が res/xml/plugin.xml にあることを確認してください

https://github.com/dhavaln/phonegap-examples/tree/master/phonegap-plugin-test

于 2012-01-25T09:40:17.267 に答える