Adobe build does not accept any plugins in my config.xml file (malformed config.xml)

I create an application that uses Cordova 3.0.0, it's pretty simple, but I need to add some plugins in the config.xml file, but whenever I add any plugins in the config.xml file, Phonegap Build tells me that the XML is incorrect. here is the xml I'm using:

  Application Name Description of my application Creator Example                   

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

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

Whenever I delete a line: everything works, but if this line is (or a similar line for any plugin in general), I get an error message ( malformed config.xml ).

Any help would be greatly appreciated.

+4
source share
3 answers

Had a similar problem and finally figured out what malformed config.xmlcaused gap:plugin.

In my case, this xml namespace was not defined correctly. 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" >

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

+7
source

I think you are mixing Cordova calls and Phonegap Build calls. For geolocation in your Phonegap Build config.xml you need the following:

<feature name="http://api.phonegap.com/1.0/geolocation"/>

DO NOT put this:

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

3.0.0. cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation.git .

. Geolocation .

+1

All Articles