versionCode vs versionName in Android Manifest
I had my app in the android market with version code = 2 and version name = 1.1
However, while updating it today, I changed the version code = 3 in the manifest but by mistake changed my version name to 1.0.1 and uploaded the apk to the market.
Now, will the users of my app get an update notification on their phones or not? Or should I redo the process again?
Reference Link
android:versionCode
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; that number is set by the versionName attribute. The value must be set as an integer, such as "100". You can define it however you want, as long as each successive version has a higher number. [...]
android:versionName
The version name shown to users. This attribute can be set as a raw string or as a reference to a string resource. The string has no other purpose than to be displayed to users. The versionCode attribute holds the significant version number used internally.
Reading that it's pretty clear that versionName is just something that's shown to the user, versionCode is what matters. Just keep increasing it and everything should be good.
Dont need to reverse your steps. As you increased your VersionCode, it means your application has upgraded already. The VersionName is just a string which is presented to user for user readability. Google play does not take any action depending on VersionName.
I'm going to give you my interpretation of the only documentation I can find on the subject.
"for example to check an upgrade or downgrade relationship." <- You can downgrade an app.
"you should make sure that each successive release of your application uses a greater value. The system does not enforce this behavior" <- The number really should increase, but you can still downgrade an app.
android:versionCode — An integer value that represents the version of the application code, relative to other versions. The value is an integer so that other applications can programmatically evaluate it, for example to check an upgrade or downgrade relationship. You can set the value to any integer you want, however you should make sure that each successive release of your application uses a greater value. The system does not enforce this behavior, but increasing the value with successive releases is normative. Typically, you would release the first version of your application with versionCode set to 1, then monotonically increase the value with each release, regardless whether the release constitutes a major or minor release. This means that the android:versionCode value does not necessarily have a strong resemblance to the application release version that is visible to the user (see android:versionName, below). Applications and publishing services should not display this version value to users.
链接地址: http://www.djcxy.com/p/29580.html上一篇: 添加搜索位置的AsyncTask