問題描述
我們總是必須將 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.
這篇關于版本碼有最大值嗎?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!