Cannot load empty config.xml file (Android build)


I am trying to run an application on my Android phone. The result of it is getting this error for following the command.

ionic cordova run

2018-01-26 00_35_58-Program Manager

My Application’s ionic info.

Does someone has an answer for this problem ?

Thanks already :slight_smile:.

1 Like

Is your config.xml empty?
You app-scripts is super old, update to a current version.
Run npm uninstall ionic to get rid of that local install.
Also look for other local cli packages in package.json and run npm install after cleaning up.

Yes config.xml is empty. I fixed this error now, Visual Studio caused the bug it deleted it overwrote something so the config.xml was empty then.

The Warning still appears of old versions. Should I maybe remove the whole node_modules folder and do a clean npm install then again ?

I tried running the command again it prints out this error. I gues its because I still have the older version or am I wrong ?

node error

Your app-scripts is super old.
Your ionic info should list the platforms you have installed.

Try removing and re-adding the platforms.

Best try it with a new project with ionic start and see if you can get it running. If you can, make sure your project matches as close as possible.

Hi, I am also getting the same error of config.xml getting cleared whnever running ionic run -l -c.
May I know the exact reason for this and how you solved it. It will be very useful.


The problem was with my Visual Studio Branch. The config.xml file got overwritten if I remember right. But im still getting alot of errors after that small “fix”.

Im sorry I don’t have a solution for it :confused:

Hey, thanks for the reply. Anyways will figure it out.

ionic integrations enable cordova --add

I had same issue, config.xml got empty suddenly. Anyway, try the code i provided above and you will be asked to overwrite resources folder.


choose no, then run your android. Overwriting your resources folder will lead to other issues.


Thanks it Worked for me.

1 Like

thank you, it worked for me.

1 Like

I also got into the same problem.
Just delete the config.xml file and run this command to create a new one

ionic integrations enable cordova --add

This worked for me.


This answer by @udayc is correct but I recommend you to just overwrite the config.xml file only. Do not overwrite the resource file as it create more issues.

May be your config.xml is zero for some reasons like PC shutdown or something else.
So just write this code in cmd line

ionic integrations enable cordova --add

Thanks, worked for me too :slight_smile:

Worked like a charm! I had to stop an initial add of the android platform due to a network issue with the shared cloud folder, the platform add would have been waiting days… when I CTRL+C it would not stop, had to terminate… blank ./config.xml THIS WORKED!

Yes you are Right!!
After running this command ionic integrations enable cordova --add

I Accepted overwrite and other issues occurred…
Some what like this --> Unexpected token in JSON at position 0

To solve this I removed the platform and added it again.
Everything started working again… :star_struck:

Thanks very much :partying_face: