Android: versionCode with cordova-plugin-app-version

Android: versionCode with cordova-plugin-app-version

我在 Android 上使用插件 cordova-plugin-app-version 获取我的混合应用程序中的版本代码和版本号。

但是versionCode好像有问题。我的 AndroidManifest.xml 看起来像:

<manifest  android:versionCode="200420151420" android:versionName="0.0.1"

但是我的Android平板电脑显示的versionCode是一个奇怪的数字,比如-1443311503

有人遇到同样的问题吗?这是从哪里来的?在我看来,它应该是 android:versionCode="200420151420" 的时间戳。

问候

不幸的是200420151420太大了。您可以使用的最大值是 2147483647

android:versionCode — An integer value that represents the version of the application code, relative to other versions.

参考: http://developer.android.com/tools/publishing/versioning.html

int: 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

参考: http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html