How to change versionCode with cordova? How to change versionCode with cordova? angularjs angularjs

How to change versionCode with cordova?


edit your config.xml, add "android-versionCode" and specify your versionCode manually:

widget id="com.xxxxx.yyyyyyyyyyy" android-versionCode="201018"version="2.1.1"


You may specify it in your config.xml file :

<widget id="io.cordova.hellocordova"  version="0.0.1"  android-versionCode="7"  ios-CFBundleVersion="3.3.3">


Cordova / PhoneGap / Ionic all accept arguments to the build command

# ionicionic build --release android -- --versionCode=3# phonegapphonegap build --release android -- --versionCode=3# plain cordovacordova build --release android -- --versionCode=3

You can see this command line arg being referenced in the source in cordova/lib/build.js:

if (options.argv.versionCode)    ret.extraArgs.push('-PcdvVersionCode=' + options.argv.versionCode);

(Me: using Cordova version 6.1.1, ionic version 1.7.16)