[英]How to change version code in AndroidManifest.xml using Cordova 3.6.4
我正在尝试更改AndroidManifest.xml.
的版本代码AndroidManifest.xml.
我正在使用Cordova 3.6.4。
根据文档,我在config.xml中更新它,但在构建之后它没有反映在AndroidManifest.xml中 。
config.xml中
<widget id="" versionCode="6" version="2.0.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
构建后的AndroidManifest.xml
<manifest android:hardwareAccelerated="true" android:installLocation="auto" android:versionCode="20002" android:versionName="2.0.2" package="" xmlns:android="http://schemas.android.com/apk/res/android">
根据Cordova API文档:
Android和iOS都支持第二个版本字符串 (或数字 ),除了应用程序商店中可见的那个,Android版的versionCode和iOS的CFBundleVersion 。
下面是一个显式设置versionCode和CFBundleVersion的示例
<widget id="io.cordova.hellocordova"
version="0.0.1"
android-versionCode="7"
ios-CFBundleVersion="3.3.3">
如果未指定替代版本,将使用以下默认值:
// assuming version = MAJOR.MINOR.PATCH-whatever
versionCode = PATCH + MINOR * 100 + MAJOR * 10000
CFBundleVersion = "MAJOR.MINOR.PATCH"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.