Reputation: 53933
I'm taking over development of an app built by a different company in ionic. I now want to push an update to the Play store and for this I want to increment the version of the app. In the config.xml I see two values:
version="1.4"
android-versionCode="10301"
I don't really understand what the difference is between these two. And why are those numbers so different? I searched around but I can't find any explanation of what the difference is between these two.
Could anyone enlighten me on what these two are for and what the difference is?
Upvotes: 2
Views: 1379
Reputation: 421
Version is the name of that version. You can upload apks to google play with the same version name, it's the optional variable.
Version code is the code the application(1, 2, 3...), this is the important variable, google play block your apks with same versionCode that you have uploaded before.
Upvotes: 0
Reputation: 373
in two words: versionName for playstore to show , and versionCode for numeration for developer and playstore for example when u want to send new beta version of app for testing to playstore u can take old versionName which you only need to change when release new version , but versionCode you need to change with each new version
for example
android:versionCode="6"
android:versionName="1.0" >
please check this https://developer.android.com/studio/publish/versioning.html
Upvotes: 0
Reputation: 357
Actually version is the version name in Gradle file and android-versionCode is versionCode in Gradle file that is actual version that app use.
here is the details for both
version(versionName): A string used as the version number shown to users. This setting can be specified as a raw string or as a reference to a string resource.
android-versionCode(versionCode): An integer used as an internal version number. This number is used only to determine whether one version is more recent than another, with higher numbers indicating more recent versions. This is not the version number shown to users;
To define the version information for your app, set values for the version settings in the Gradle build files. These values are then merged into your app's manifest file during the build process.
Check the more information from here https://developer.android.com/studio/publish/versioning.html
Upvotes: 0
Reputation: 11
If you want to update your app on playstore the new version code should be higher than any previous apk.
lets suppose previous apk which you uploaded on playstore have version code=3 then the new apk must have >3 version code..
but the version name can be any number its just to show the user which version it is and have nothing to do with developer.
Upvotes: 1