我需要先在 Play 开发者控制台的 alpha 测试 channel 发布我的应用程序,然后再发布到生产环境。假设我在 alpha 发布了版本代码为 1.0.0 的应用程序。测试后,我需要发布应用程序更新,因此我将版本代码增加到 1.0.1、1.0.2 等。
完成测试后,我可以将初始版本代码为 1.0.0 的新 apk 上传到生产环境吗?我不想推广在 alpha channel 上发布的 apk,它会增加版本代码,即 1.0.5。这会导致任何问题吗?
对于如何处理此案,您还有其他建议吗?
谢谢,
卢普
最佳答案
在 Android 中,应用程序版本控制由两部分组成。
- android:versionCode - An integer value that represents the version of the application code, relative to other versions.
- android:versionName — A string value that represents the release version of the application code, as it should be shown to users.
用户可见的是第二个。所以你可以有一个 alpha 版本,其中 android:versionName
是 "1.0.0"
而 android:versionCode
是 1
(整数),然后进行测试和修复,当您准备好在生产中部署时,将 android:versionName
保持为 "1.0.0"
但 android:versionCode
从它在 alpha 中的最后一个值增加 1
,例如android:versionName="1.0.0"
,android:versionCode=5
(产品是您初始 aplha 部署的第 5 次更新)。当然你可以把 "1.0.0"
改成任何你喜欢的,你也可以降低它,例如"0.9.0"
,它是 android:versionCode
,它总是应该递增 1
。
您可以在此处阅读更多信息:Versioning Your Applications
关于android - 我可以从 alpha 测试 channel 获得较低版本的代码吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25849858/