versionCode vs versionName in Android Manifest(Android Manifest 中的 versionCode 与 versionName)
问题描述
我的应用在 android 市场上,版本代码 = 2,版本名称 = 1.1
但是,今天更新的时候,我在manifest中修改了version code = 3,却误把我的版本名改成了1.0.1,然后把apk上传到了市场.
现在,我的应用用户是否会在手机上收到更新通知?还是我应该重做一遍这个过程?
参考链接
android:versionCode
<块引用>内部版本号.此数字仅用于确定一个版本是否比另一个版本更新,数字越大表示版本越新.这不是向用户显示的版本号;该数字由 versionName 属性设置.该值必须设置为整数,例如100".您可以根据需要定义它,只要每个后续版本都有一个更高的数字.[...]
android:版本名称
<块引用>向用户显示的版本名称.此属性可以设置为原始字符串或字符串资源的引用.该字符串除了显示给用户之外没有其他用途.versionCode 属性保存内部使用的重要版本号.
很明显,versionName 只是向用户显示的内容,versionCode 才是最重要的.继续增加它,一切都应该很好.
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.
这篇关于Android Manifest 中的 versionCode 与 versionName的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Android Manifest 中的 versionCode 与 versionName


基础教程推荐
- 使用 Ryzen 处理器同时运行 WSL2 和 Android Studio 2022-01-01
- 如何使 UINavigationBar 背景透明? 2022-01-01
- LocationClient 与 LocationManager 2022-01-01
- 如何使用 YouTube API V3? 2022-01-01
- 在 iOS 上默认是 char 签名还是 unsigned? 2022-01-01
- 固定小数的Android Money Input 2022-01-01
- Android ViewPager:在 ViewPager 中更新屏幕外但缓存的片段 2022-01-01
- Android文本颜色不会改变颜色 2022-01-01
- “让"到底是怎么回事?关键字在 Swift 中的作用? 2022-01-01
- :hover 状态不会在 iOS 上结束 2022-01-01