Tuesday, 15 July 2014

cordova - PhoneGap plugin install not working -



cordova - PhoneGap plugin install not working -

i have phonegap 3.x installed, , have been using command line api build out android app.

i need access hardware features contacts, used api install plugin. however, when list installed plugins, none found, , contacts object on navigator not defined.

here command line commands:

build successful total time: 2 minutes 3 seconds [phonegap] compiled android app phonegap plugin list [phonegap] no plugins installed phonegap local plugin add together org.apache.cordova.contacts [phonegap] adding plugin: org.apache.cordova.contacts [phonegap] added plugin phonegap plugin list [phonegap] no plugins installed

i tried deleting both plugins folder content, , re-creating android platform, tried re-add plugins, no luck.

the plugin in plugins folder looks right content, there android.xml file in plugins folder, reason pg doesn't see plugin installed.

i on windows 7, phonegap ver 3.5.0-0.20.4

same issue here on mac os, phonegap v3.5.0-0.20.4

the problem comes error in file lib/phonegap/local.plugin.list.js homecoming list of plugins not correct.

localpluginlistcommand.prototype.listplugins = function(plugins, callback) { var self = this, e = null; // error not supported cordova, future if (plugins instanceof error) { e = plugins; plugins = []; self.phonegap.emit('error', e); } else if (typeof plugins === 'string') { // identify "no plugins" response phonegapify output if (plugins.indexof('no plugins added') > -1) { plugins = []; self.phonegap.emit('log', 'no plugins installed'); } else { // list plugins self.phonegap.emit('log', plugins); } } callback(e, plugins);

};

here official correction of wrong file : https://github.com/phonegap/phonegap-cli/commit/d8d54ece21300dad63015779b6c5c629510c17d6

cordova phonegap-plugins phonegap-build

No comments:

Post a Comment