Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android cordova phonegap config.xml unbound prefix

I have the following config.xml file for my android app, and I am trying to install launchmyapp plugin. Everytime I clean, I get this the following error

/code/platforms/android/res/xml/config.xml:21: error: Error parsing XML: unbound prefix

I checked other stack questions and everyone is pointing to wrong formatting in the parameter fields, but all seems ok...

here is the config.xml

<?xml version='1.0' encoding='utf-8'?>
    <widget id="com.myappname.Myappname" version="2.2.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>MyAppName</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>
    <feature name="org.apache.cordova.facebook.Connect">
        <param name="ios-package" value="FacebookConnectPlugin" />
    </feature>
    <preference name="KeyboardDisplayRequiresUserAction" value="false" />
    <content src="index.html" />
    <access origin="*" />
    <gap:plugin name="nl.x-services.plugins.launchmyapp">
        <param name="URL_SCHEME" value="myappname" />
    </gap:plugin>
</widget>
like image 756
seesoe Avatar asked Feb 11 '15 18:02

seesoe


Video Answer


1 Answers

I've encountered the same question as yours. I supposed it's because <gap:plugin> must be bound to phonegap prefix.

So I solved this question by adding xmlns:gap="http://phonegap.com/ns/1.0" at node.

In your case, the full <widget> should be:

<widget id="com.myappname.Myappname" version="2.2.3"  xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:gap="http://phonegap.com/ns/1.0">

Hope it works for you.

like image 174
Zhu junior Avatar answered Oct 14 '22 06:10

Zhu junior