3 Replies Latest reply on Sep 2, 2017 3:14 AM by vangroover

    malformed config.xml w



      I had a working app but now I get malformed config.xml What's wrong?

      See http://jete.nl/afbeeldingen/foutmelding.png


      <?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.tempel.demoApp"

              versionCode = "10"

              version     = "1.0.0" >


          <!-- versionCode is optional and Android only -->


          <name>PhoneGap Demo App</name>

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

        <gap:splash src="img\splash.png" />

        <gap:platform name="android" />

        <gap:plugin name="org.apache.cordova.device" version="0.2.12" />

        <gap:plugin name="org.apache.cordova.network-information" version="0.2.12" />

        <gap:plugin name="org.apache.cordova.inappbrowser" version="0.5.2" />

        <preference name="orientation" value="portrait" />

        <preference name="fullscreen" value="true" />



              Een voorbeeld met xml uit Hst. 5



          <author href="https://build.phonegap.com" email="j.tempel@scholenaanzee.nl">





        • 1. Re: malformed config.xml w
          kerrishotts Adobe Employee

          This is not valid XML:


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


          See PhoneGap Build Documentation  for the documentation on how to format this tag, but this should get you to valid XML:


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


          You can check your XML online should you get an error. http://www.xmlvalidation.com/  is what I used to find the error.

          • 2. Re: malformed config.xml w

            <?xml version="1.0" encoding="utf-8" ?>

            <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        = "tri.maker.app"

                version   = "1.3.0">





                <author email="foodsite6@gmail.com" href="http://cordova.io">



                <icon src="icon.png" />         

                <content src="index.html" />


                <preference name="orientation" value="portrait" />

                <preference name="android-build-tool" value="gradle" />

                <preference name="permissions" value="none"/>


                <gap:plugin name="cordova-plugin-whitelist" source="npm" />

                <gap:plugin name="phonegap-plugin-push" source="npm" spec="1.5.3" />





                <gap:plugin name="cordova-plugin-device" source="npm/>      

                <gap:plugin name="cordova-plugin-inappbrowser" source="npm" />      

                <gap:plugin name="cordova-plugin-splashscreen" source="npm"/>  

                <gap:plugin name="cordova-plugin-geolocation" source="npm"/>

                <gap:plugin name="cordova-plugin-network-information" source="npm"/>  


                <gap:plugin name="cordova-plugin-request-location-accuracy" source="npm" />

                <gap:plugin name="cordova-plugin-x-toast" source="npm" />  

                <gap:plugin name="cordova-plugin-media" />  







                <gap:plugin spec="https://github.com/mapsplugin/cordova-plugin-googlemaps.git" source="git" >

                   <param name="API_KEY_FOR_ANDROID" value="xxx" />

                   <param name="API_KEY_FOR_IOS" value="XXX" />



                <plugin name="cordova-plugin-insomnia" version="4.1.0" source="npm" />   


                <gap:splash src="splash.png" />

                <preference name="AutoHideSplashScreen" value="false" />    

                <preference name="SplashScreenDelay" value="5000" />


                <access origin="*" />

                <access origin="tel:*" launch-external="yes" />


                <gap:config-file platform="android" parent="/manifest">

                    <supports-screens android:xlargeScreens="true" android:largeScreens="true" android:smallScreens="true" />

                    <application android:theme="@android:style/Theme.NoTitleBar" >          









            Can you help me here?kerrishotts

            • 3. Re: malformed config.xml w
              vangroover Adobe Employee

              please use an xml validator to validate your config.xml is valid xml.  there are sites such as https://www.xmlvalidation.com/ and most IDE's will validate xml syntax as well.


              the cordova-plugin-device plugin tag is a missing a double quote.