Sab*_*ari 21
在config.xml中
<widget android-packageName="com.package.app.android" android-versionCode="1000" id="com.package.app" version="1.0" xmlns="w3.org/ns/widgets"; xmlns:cdv="cordova.apache.org/ns/1.0">
Run Code Online (Sandbox Code Playgroud)
在config.xml中更改这些行.每次构建一个.希望这会有所帮助
<!-- Android -->
<widget id="io.cordova.hellocordova" version="0.0.1" android-versionCode="13" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
</widget>
<!-- iOS -->
<widget id="io.cordova.hellocordova" version="0.0.1" ios-CFBundleVersion="0.1.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
</widget>
Run Code Online (Sandbox Code Playgroud)
For the android, you have to edit your build.gradle file which will be available inside android folder inside your project.
In build.gradle file, you have to change versionCode and versionName
see the example code below
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.companyname.appname"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Run Code Online (Sandbox Code Playgroud)
对于离子 4,没有android-versionCode场。因此,您应该更改config.xml 文件中的versioninwidget字段(通常为第 2 行)。
例如:
<widget id="myapp.mycompany.com" version="0.0.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
Run Code Online (Sandbox Code Playgroud)
在这种情况下,只需将版本从 0.0.3 更改为 0.0.4 或您想要的任何数字。
| 归档时间: |
|
| 查看次数: |
13919 次 |
| 最近记录: |