Updating versionCode for Android PhoneGap app

59 Views Asked by At

I have tried updating the config.xml file to include: versionCode="10002"

I've created a 'platforms/android/release-signing.properties' file and ran:

phonegap build --release android --versionCode=10002

Nothing seems to make the versionCode=10002 stick. How can I fix this?

2

There are 2 best solutions below

0
tkjef On BEST ANSWER

I had tried it with both the "android-" prepended and without. As well as with the parameters on separate lines rather than on the same line.

That did not help.

What did end up resolving it for me was creating a new PhoneGap Build app. That was created fine with the new version and I uploaded to the Google Play Store no problem. It seems to be a bug with PhoneGap's inability to update the version number. Too bad.

0
Dexter On

It should work if you add android-versionCode instead of just versionCode to the <widget> in config.xml.

For example:

<widget id="com.test.app"
    version="1.2.3"
    android-versionCode="10002">