0

Trying to Generate PhoneGap Build using Adobe ColdFusion Builder 2016.

When I include:

    <application android:label="@string/app_name" >
    <activity android:name="IntentTest"
              android:label="@string/app_name" 
android:configChanges="orientation|keyboardHidden">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
<intent-filter><action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:host="www.youtube.com" android:scheme="http"></data>
</intent-filter>

        </activity>

<activity android:name="org.apache.cordova.DroidGap" 
android:label="@string/app_name" 
android:configChanges="orientation|keyboardHidden"> 
<intent-filter></intent-filter>

</activity>

</application>

I get this error at build.phonegap.com

Error - Malformed config.xml - You can fix this here.

I have tried other <application> tag and the same result.

1 Answers1

0

Phonegap docs

In the above document, it describes how to exempt code from the xml parse on phonegap.

you can contribute xml directly to your Android Manifest and iOS Property List >files, via the config-file element (beta feature).

For Android, you have to include this in the header.

<widget xmlns = "http://www.w3.org/ns/widgets" xmlns:gap = 
"http://phonegap.com/ns/1.0" xmlns:android = 
"http://schemas.android.com/apk/res/android" id = "com.yourapp" 
version = "1.0.0">

Then in the code

  <config-file platform="android"  parent="./application" mode="add">


    <application android:label="@string/app_name" >
    <activity android:name="IntentTest"
              android:label="@string/app_name" 
android:configChanges="orientation|keyboardHidden">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
<intent-filter><action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:host="www.youtube.com" android:scheme="http"></data>
</intent-filter>

        </activity>

<activity android:name="org.apache.cordova.DroidGap" 
android:label="@string/app_name" 
android:configChanges="orientation|keyboardHidden"> 
<intent-filter></intent-filter>

   </activity>

    </application>

    </config-file>

When I generated the Build on build.phonegap.com the tag and all related code were included in the AndroidManifold.xml