Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adobe build doesn't accept any plugins in my config.xml file (malformed config.xml)

I am building an application that uses Cordova 3.0.0, it is pretty simple but I require adding some plugins in the config.xml file, but whenever I add any plugin lines in the config.xml file, Phonegap Build tells me that the XML is malformed, here is the XML I am using:

AppName My app description Example Creator

<icon src="img/icon.png" />

<gap:plugin name="org.apache.cordova.core.geolocation" />

Whenever I remove the line: everything works, but if that line is there (or a similar line for any plugin whatsoever), I receive the error message (malformed config.xml).

Any help would be highly appreciated.

like image 498
Michel Tobon Avatar asked Jan 12 '23 04:01

Michel Tobon


1 Answers

Was having a similiar issue, and finally found out that the malformed config.xml is being caused by the gap:plugin.

In my case it was the xml namespace that was defined incorretly. Look at the top of your file, it should be something like:

<?xml version="1.0" encoding="UTF-8" ?>
    <widget xmlns   = "http://www.w3.org/ns/widgets"
    xmlns:gap   = "http://phonegap.com/ns/1.0"
    id          = "com.phonegap.example"
    version     = "0.0.1" >

Where the important part is having xmlns:gap = "http://phonegap.com/ns/1.0", which in my case was only xmlns:cdv="http://cordova.apache.org/ns/1.0".

like image 145
Michael Avatar answered Jan 30 '23 20:01

Michael