Set app version Ionic 3

Everytime I set the app’s version number in config.xml and save, then build the app, it reverts to the previous version number. I have the following…

<widget id=“com.ionic.theapp” version=“0.5.4” …

When I set it to 0.5.5 and save, then rebuild the app, it reverts to 0.5.4. Any idea why, or what I’m doing wrong? Is there somewhere else I should be updating the version number?

Thanks.

What file are you changing?
You should be changing it in config.xml in your project root directory.

1 Like

I do change it in config.xml in the root directory, but it keeps reverting back to the previous version. It’s only after 3 or 4 builds and updates does it finally stick. It’s kind of annoying.

So your config.xml changes back to its previous content?

Sorry, not the whole file, just the version number attribute in the <widget> tag

<widget id=“com.ionic.theapp” version=“0.5.4” …

When I change it to 0.5.5, save, then rebuild, it reverts back to 0.5.4. I change it back to 0.5.5, save, rebuild, same thing. This happens 3 or 4 times then it finally sticks to 0.5.5.

What commands are you using to build?

It’s livereload (not fresh rebuild), so after saving the change, the app rebuilds. To run initially, I run

ionic cordova run android -lc

I’m not sure if that actually “builds” the app.

You have to change the version and then run:

ionic cordova build android