版本码有最大值吗?

Is there a max value for versioncode?(版本码有最大值吗?)
本文介绍了版本码有最大值吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我们总是必须将 versionCode 增加一些任意数字才能将其发布到 google play.
该值是否有限制,如果达到会发生什么情况?

We always have to increment versionCode by some arbitary number to publish it to google play.
Is there limit to that value and what will happen if it is reached?

defaultConfig {
        applicationId "my.app"
        minSdkVersion 15
        targetSdkVersion 22
        versionCode 65
        versionName "1.05"
        setProperty("archivesBaseName", "myapp-$versionCode")

    }

推荐答案

更新 08/11/2016 (UTC):

Update 08/11/2016 (UTC):

docs 已更新.不是旧的 MAX_INT 值,也不是 2000000000.

The docs has been updated. Not the old MAX_INT value nor the 2000000000.

警告:Google Play 允许 versionCode 的最大值为 2100000000.

Warning: The greatest value Google Play allows for versionCode is 2100000000.

<小时>

在此处交叉发布以提高知名度.


Cross-post for visibility here.

Google 似乎最近发生了变化,使得 versionCode 的最大值仅达到 2000000000.

It seems there was a recent change in Google, making the maximum versionCode up to 2000000000 only.

参考帖子:Google Play 开发者控制台错误:您的 APK 版本代码过高,您可能无法更新 APK

PS:对于那些计划提供参考官方文档的人其中提到的最大值是 2147483647,请先阅读我引用的帖子中的答案.它提到截至当前日期(08/10/2016),它仍未更新.

PS: For those who are planning to provide reference to the official documentation where the mentioned max value is 2147483647, please read the answer first in the post I referenced. It mentions that as of current date (08/10/2016), its still not updated.

这篇关于版本码有最大值吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Android release APK crash with java.lang.AssertionError: impossible in java.lang.Enum(Android 发布 APK 因 java.lang.AssertionError 崩溃:在 java.lang.Enum 中不可能)
Finished with Non Zero Exit Value 3(以非零退出值 3 结束)
On gradle:3.0.0 More than one file was found with OS independent path #39;META-INF/ASL2.0#39;(在 gradle:3.0.0 上找到多个文件,其独立于操作系统的路径为“META-INF/ASL2.0)
Android : app loading library at runtime on Lollipop but not IceCreamSandwich(Android:运行时在 Lollipop 上而不是 IceCreamSandwich 上的应用程序加载库)
buildConfigField depending on flavor + buildType(buildConfigField 取决于风味 + buildType)
How do I suppress warnings when compiling an android library with gradle?(使用 gradle 编译 android 库时如何抑制警告?)