0

I am building for Android using Cordova with Ionic. I have set the versionCode in the widget tag inside the config.xml file to 10. But after building the app I am getting the version code as 108.

The version of Cordova that I have is 6.1.1.

How can I build an app where the versionCode is unchanged?

dda
  • 6,030
  • 2
  • 25
  • 34
krv
  • 2,830
  • 7
  • 40
  • 79

1 Answers1

1

This still seems to be an unresolved issue in Cordova since version 5.0. Check out this issue link for more info on the same.

Also I suggest you to look at the following SO post for possible resolution of the issue.

Community
  • 1
  • 1
Gandhi
  • 11,875
  • 4
  • 39
  • 63
  • Is there a tag in config file that I can add to solve this like PhoneGap build has a `android-versioncode` preference which overrides what is set in the widget attribute..see this https://forums.adobe.com/thread/2210856 – krv Nov 12 '16 at 03:48
  • Also, the greatest value allowed by playstore for versionCode is `2100000000` So if it keeps on adding 8 at the end I will be able to update my app only 9 times.. – krv Nov 12 '16 at 03:50
  • @krv did you checked the so post link I mentioned?? This issue seems to be fixed in Cordova-android-5.2.0 as per the latest comments. Check out. Else you may have to tweak build.gradle.file I dont think we have any readymade tag to fix it in config.xml – Gandhi Nov 12 '16 at 03:57
  • I checked the cordova version which is 6.2.0..How do I update `cordova-android`? – krv Nov 12 '16 at 04:00