Is there a max value for versioncode?

前端 未结 3 1707
天命终不由人
天命终不由人 2020-12-30 21:09

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 rea

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-30 21:27

    Starting at Android Pie (9), the version code will be a long (source). The max value of a long is 9,223,372,036,854,775,807 so you shouldn't run into any issues regarding length here.

    Do note that it's still an int in older android versions, so long is only relevant to you when your minSdkVersion is 28 or higher.

提交回复
热议问题