Reputation: 13
I need to update my apk in playstore. So i changed my version in config.xml as usual. But now it throw errorrs in parsing config.xml.
Also i tried new project and build it. it worked fine for me. But When i change version of new project same errors thrown.
CLI
myapp$ cordova build android
Parsing /Users/abid/Android/phonegap/myapp/config.xml failed
Error: Unquoted attribute value
Line: 1
Column: 41
Char: “
at error (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/elementtree/node_modules/sax/lib/sax.js:347:8)
at strictFail (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/elementtree/node_modules/sax/lib/sax.js:364:22)
at Object.write (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/elementtree/node_modules/sax/lib/sax.js:913:11)
at XMLParser.feed (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/elementtree/lib/parsers/sax.js:48:15)
at ElementTree.parse (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/elementtree/lib/elementtree.js:271:10)
at Object.exports.XML (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/elementtree/lib/elementtree.js:606:13)
at Object.module.exports.parseElementtreeSync (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/util/xml-helpers.js:123:38)
at Object.ConfigParser (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/configparser/ConfigParser.js:33:24)
at getScriptsFromConfigXml (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/scriptsFinder.js:108:21)
at getApplicationHookScripts (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/scriptsFinder.js:56:17)
Config.xml
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.demo.myapp" version=“1.3.1” xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>myapp</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="[email protected]" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" version=“3” />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
</widget>
```
Upvotes: 1
Views: 3507
Reputation: 3226
Character “ is not the same as ". Use a real text editor such as notepad, vim to correct the quotes around the version number.
Upvotes: 2