1
votes

I've built an Ionic app and want to upload a new version to the Alpha Track in Google Play Dev Console. I changed the version in config.xml as explained in Cordova docs on config.xml

<widget id="nu.velt.tuintalent" version="0.0.2" android-versionCode="2" .....

When running gulp build-android, it indeed updates the versionCode and versionName in the AndroidManifest.xml as you can see in the snippet below.

<manifest android:hardwareAccelerated="true" android:versionCode="2" android:versionName="0.0.2" .....

After signing and running zipalign, I try to upload the APK in Google Play Dev Console. There I get the error that the upload failed.

You need to use another versioncode for your APK because you already have an APK with verionscode 1.

What am I doing wrong here?

2

2 Answers

1
votes

Verify versionCode and versionName of generated APK. Run this commond-

aapt dump badging myapp.apk

aapt.exe is in build-tools dir.

1
votes

Previously I built the APK with a Gulp command like

gulp build-android

When I tried building the APK with the following command, the version was correctly updated

ionic build --release android