|Feature||Cloud Build - Application package, Publish - App Stores|
|Mobile development type||Hybrid (Cordova app)|
|Cordova framework version||Cordova 3.7.0 and above|
There is an additional 2 appended in the
android:versionCode property after you build a hybrid project for the Android platform. For example, if you have set the Properties > Android > Version Code to 1, after the Cloud Build or Publish operation, the actual versionCode in the
AndroidManifest.xml of the apk will be 12.
- Create a Cordova application.
- Verify that the Version Code property, under Properties > Android is set to 1.
- Build the project for the Android platform as an application package.
- Check the
AndroidManifest.xmlof the built apk. The
This is an external issue in the Apache Cordova framework. More information about this is available here:
- platforms/android/build.gradle Modifies Android versionCode on Jira
- Why does Cordova/Phonegap append 8 to my Android Version Code? on Stack Overflow
No verified solution available.
This is the original behavior applied by Cordova for differentiating between the Android ARM and x86 types of Gradle build. At this stage, we have decided not to interfere with this logic, as our modification can conflict with the solution Cordova comes up with in the future.
Even though modified internally, the version code will not increase too quickly and you will not run out of possible version codes.
With the current convention and the internal modification, when you increase your version code by one, your actual version code will be increased by ten. For example, when you enter 16, the version code of the apk becomes 162. The next time you need to increase this, you can enter 17 and the version code will become 172.
If you follow the standards for versioning your app, you will be able to use 214,748,364 numbers for version code.