Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic/Cordova does not update versionCode for Android

When I change the version in my config.xml, the internal Android versionCode ist not updated to the new value. Android Console is always showing an error because "I already have an App with that versionCode on the Play Store".

I've also tried the following things in config.xml

<widget ... version="1.1.4" versionCode="10104" android-versionCode="10104" ...>
<platform name="android">
  <preference name="android-manifest/@android:versionCode" value="114" />
</platform>

Doesn't work. The versionCode stays the same.

UDPATE: I deleted the Android platform and re-added it, now it works!

like image 792
John Brunner Avatar asked Oct 30 '22 18:10

John Brunner


1 Answers

Changing VersionCode manually is not a good idea , You should only change version in config.xml,after that run

ionic build --release android

It will automatically update your AndroidManifest.xml.Make sure if version code is updated before publishing your app to play store.

Thanks

like image 154
Ujjwal kaushik Avatar answered Nov 14 '22 23:11

Ujjwal kaushik