6 Replies Latest reply on Dec 21, 2016 8:08 AM by djmichaelw

    Can't build app right when adding config.xml


      Hello peeps,


      I'm starting to learn how to make apps. Everything works fine except when i add a config.xml file to my zip which i upload to build.phonegap. When i add the config file everything shifts in my app and it's just not working as a app anymore it looks more like a one page webpage if you know what i mean.

      .apk with config:                                                  .apk without config

      2016-12-20 21.20.16.png2016-12-20 21.22.05.png

      The second image is how it supposed to be. But if i upload it like this none of the plugins will work. Can somebody help me. I've also added a zip file with my uploaded files plus the config.xml. (zip file)


      I've been trying for 10 days now and nothing on the web has worked yet.


      Thanks in advance!


      Greetz Michael

        • 1. Re: Can't build app right when adding config.xml
          ryanskihead Adobe Employee

          To start with, you're sourcing jquery css and js assets from the web -- any static files should be bundled into your app and loaded locally as per phonegap best practices.

          • 2. Re: Can't build app right when adding config.xml
            djmichaelw Level 1

            How do you mean? So first i build it in phonegap. Zip all the files and than upload it? because i have tried that but it still didn't work.

            • 3. Re: Can't build app right when adding config.xml
              VectorP Level 4

              About your config:


              1. You're using many plugins. Do you really need them all? Remove whichever you don't need.

              2. You are setting many plugins to an older version. Are you doing so on purpose (and for what purpose?)

              3. You are using the density attribute for compound splash qualifiers. Can't do that! Use the qualifier attribute instead. See the Icons and Splashes section of the PGB docs


              About your index:


              1. As Ryan said: it would be a good idea to include the jQuery libs in your local assets, instead of including them from https://code.jquery.com/...

              2. If fetching content from external servers, you need to whitelist them. See the cordova-plugin-whitelist documentation for the proper whitelist rules (which are not limited to 'access-intent'!)

              3. Since you are using jQuery, you should refrain from using vanilla javascript parts, like:

              function loadDoc() {

                var xhttp = new XMLHttpRequest();
                xhttp.onreadystatechange = function() {....

              I suggest you use the jQuery functionality, instead.

              • 4. Re: Can't build app right when adding config.xml
                djmichaelw Level 1

                Thanks for your help VectorP.


                I've removed a lot of plugins (this is my first project so i've added them from the Hello World template). For the plugins i don't know how to see the latest versions i didn't give them older versions on purpose. This is also grabbed from the hello world template.


                I'm changing the splash and icon attributes now! I didn't know that it doesn't work like that


                For the index:

                1. But how do i do that? I'm so sorry for asking so many things but it is really my first time making such a thing!

                2. Got it. i'm changing them at the moment!

                3. I didn't know the where different i'm going to look into that!


                Again thanks for your help so far!

                • 5. Re: Can't build app right when adding config.xml
                  VectorP Level 4


                  You can find the version history of each plugin at its github page, which can easily be accessed from the NPM's plugin's page.

                  For PGB: if you specify the plugin without a version or spec attribute, PGB will include the latest plugin release automatically.



                  You can download jQuery assets from the jQuery website, then include them in your zip file. Of course, you need to change the 'script tag' to a local relative url.

                  For instance, find jQuery libs here:


                  • 6. Re: Can't build app right when adding config.xml
                    djmichaelw Level 1

                    Thank you so much it is working like a charm!