我的应用在android市场上的版本代码为2,版本名称为1.1
但是,今天更新的时候,我在manifest里把版本码改成了3,但是错误的把我的版本名改成了1.0.1,并把apk上传到了市场。
现在,我的应用程序的用户会在他们的手机上收到更新通知吗?还是我要重做一遍?
我的应用在android市场上的版本代码为2,版本名称为1.1
但是,今天更新的时候,我在manifest里把版本码改成了3,但是错误的把我的版本名改成了1.0.1,并把apk上传到了市场。
现在,我的应用程序的用户会在他们的手机上收到更新通知吗?还是我要重做一遍?
当前回答
参考链接
android: versionCode
内部版本号。此数字仅用于确定一个版本是否比另一个版本更新,数值越大表示更新版本。这不是显示给用户的版本号;该数字由versionName属性设置。 取值必须为整数,例如“100”。您可以任意定义它,只要每个后续版本都有一个更高的数字。[…]
android: versionName
显示给用户的版本名。此属性可以设置为原始字符串或字符串资源的引用。字符串除了显示给用户外没有其他用途。versionCode属性保存内部使用的重要版本号。
读到这里,很明显versionName只是显示给用户的东西,versionCode才是重要的。只要不断增加,一切都会好起来的。
其他回答
版本代码被谷歌播放商店用于新的更新。版本名显示给用户。 如果您增加了版本代码,则更新将对所有用户可见。
要了解更详细的信息,请花2分钟阅读这篇文章https://developer.android.com/studio/publish/versioning.html
版本的代码 代表你的代码的版本,android操作系统通过使用这个变量来检查是否更新这个代码是旧的还是新的。
版本名称 以-格式表示版本名称
(主要),(小)。(点)
字符串,仅用于可读字符串,功能版本代码已被OS使用。
The answer from Tanoh could use some clarification. VersionCode is the equivalent of a build number. So typically an app will go through many iterations before release. Some of these iterations may make it to the Google Play store in the form of alpha, beta, and actual releases. Each successive iteration must have an incremented versionCode. However, typically you only increase the versionName when between public releases. Both numbers are significant. Your users need to know if the version they have on their phone is the latest or not (versionName) and the Play Store and CI systems such as bitrise rely on and/or update the build number (versionCode)
它确实基于versionCode而不是versionName。然而,我注意到,改变AndroidManifest.xml中的versionCode对于Android Studio - Gradle构建系统是不够的。我需要在build.gradle中更改它。
我猜用户仍然会收到更新通知,因为你增加了你的版本代码。但是您的版本名将显示为1.0.1给用户。