Vipassana Vijayarangan
Vipassana Vijayarangan

Reputation: 8869

Issue with phonegap local build for android

I am trying to build my phonegap app locally and am incountering the following error

[phonegap] adding the Android platform...

Error: Invalid attribute name Line: 0 Column: 36 Char: ? at error (/usr/lib/node_modules/phonegap/node_modules/cordova/node_modules/elementtree/node_modules/sax/lib/sax.js:347:8) at strictFail (/usr/lib/node_modules/phonegap/node_modules/cordova/node_modules/elementtree/node_modules/sax/lib/sax.js:364:22) at Object.write (/usr/lib/node_modules/phonegap/node_modules/cordova/node_modules/elementtree/node_modules/sax/lib/sax.js:876:16) at XMLParser.feed (/usr/lib/node_modules/phonegap/node_modules/cordova/node_modules/elementtree/lib/parsers/sax.js:48:15) at ElementTree.parse (/usr/lib/node_modules/phonegap/node_modules/cordova/node_modules/elementtree/lib/elementtree.js:263:10) at Object.exports.XML (/usr/lib/node_modules/phonegap/node_modules/cordova/node_modules/elementtree/lib/elementtree.js:593:13) at Object.module.exports.parseElementtreeSync (/usr/lib/node_modules/phonegap/node_modules/cordova/src/xml-helpers.js:111:38) at Object.config_parser (/usr/lib/node_modules/phonegap/node_modules/cordova/src/config_parser.js:25:20) at Object.platform (/usr/lib/node_modules/phonegap/node_modules/cordova/src/platform.js:65:15) at LocalBuildCommand.module.exports.addPlatform (/usr/lib/node_modules/phonegap/lib/phonegap/local.build.js:153:13)

I am using phonegap 3.0.0

Upvotes: 1

Views: 1476

Answers (2)

Caio Ladislau
Caio Ladislau

Reputation: 1307

The right way is:

1) $ phonegap platform rm android

2) $ phonegap plaftorm add android

3) $ phonegap build android

It is also recommended to do this when you add or remove plugin.

Upvotes: 0

mihsathe
mihsathe

Reputation: 9154

I might be a little late but I just had this problem and solved it.

I just deleted the android folder in 'platforms' and reran

phonegap run android

you can also do phonegap add android if you don't want to run it.

Make sure to back up your xml manifests if you made any changes.

Upvotes: 1

Related Questions