I am trying to change the version code in AndroidManifest.xml.
I am using Cordova 3.6.4.
As per the docs I am updating it in the config.xml but it is not reflecting in the AndroidManifest.xml after the build.
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 after build
<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">
The plugin. xml file is an XML document in the plugins namespace: http://apache.org/cordova/ns/plugins/1.0 .
Cordova-Android projects can be opened in Android Studio. This can be useful if you wish to use Android Studio's built in Android debugging and profiling tools or if you are developing Android plugins. Note: When opening your project in Android Studio, it is recommended to NOT edit the code within the IDE.
As per Cordova API docs:
Both, Android and iOS support a second version string (or number) in addition to the one visible in app stores, versionCode for Android and CFBundleVersion for iOS.
Below is an example that explicitly sets versionCode and CFBundleVersion
<widget id="io.cordova.hellocordova"
version="0.0.1"
android-versionCode="7"
ios-CFBundleVersion="3.3.3">
If alternative version is not specified, the following defaults will be used:
// assuming version = MAJOR.MINOR.PATCH-whatever
versionCode = PATCH + MINOR * 100 + MAJOR * 10000
CFBundleVersion = "MAJOR.MINOR.PATCH"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With