Android版的versionName /版本code的最大长度(舱单) [英] Maximum Length of Android versionName / versionCode (Manifest)
问题描述
我试图找出这两个机器人的最大长度:的versionName和android:Android清单文件的版本code属性?
I am trying to find out the maximum length of both the android:versionName and android:versionCode attributes of the android manifest file?
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xxxx.xxxx"
android:versionCode="185" <--- THIS ATTRIBUTE
android:versionName="1.0.185"> <--- AND THIS ATTRIBUTE
有一个最大值还是会pretty多少让任何东西,如果没有最大的有适当一定的规则?
Is there a maximum value or will it pretty much allow anything if there is no maximum are there certain rules in place?
推荐答案
根据 Android文档:
安卓版本code - 一个整数
,稀土presents应用code的版本价值,相对于其他版本。
android:versionCode — An integer
value that represents the version of the application code, relative to other versions.
根据 Oracle文档:
默认情况下, INT
数据类型是一个32位有符号二进制补码整数,其中有-2 ^ 31的最小值和最大值(2 ^ 31)-1。在Java SE 8及更高版本,可以使用int数据类型来重新present的32位无符号整数,其中有最小值0和(2 ^ 32)-1的最大值。
By default, the int
data type is a 32-bit signed two's complement integer, which has a minimum value of -2^31 and a maximum value of (2^31)-1. In Java SE 8 and later, you can use the int data type to represent an unsigned 32-bit integer, which has a minimum value of 0 and a maximum value of (2^32)-1.
安卓的versionName - A 字符串
,稀土$ P $值psents应用code的发行版本,因为它应该显示给用户。
android:versionName — A string
value that represents the release version of the application code, as it should be shown to users.
关于字符串
最大长度,<一个href=\"http://stackoverflow.com/questions/816142/strings-maximum-length-in-java-calling-length-method\">this SO质疑可以帮助你。
Regarding String
max length, this SO question may help you.
这篇关于Android版的versionName /版本code的最大长度(舱单)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!