Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change versionCode with cordova?

Tags:

I upload my application in Google Play with the default versionCode and versionName, but i have a new code and i need to change this versionCode and versionName.

I searched for some solutions for this problem but any solution works for me

  • config.xml
 android-versionCode="2" android-versionName="2.0"
  • AndroidManifest.xml
android:versionCode="2" android:versionName="2.0"
  • build.gradle
 defaultConfig {
     android:versionCode 2
     android:versionName "2.0"
  }

After configure this files i use the command

aapt dump badging myappPath.apk

It always returns versionCode="1" and versionName="1.0"

Please, help me.

like image 905
marcosaz95 Avatar asked Jun 28 '16 13:06

marcosaz95


People also ask

How do I change my app name in cordova?

In cordova project> properties > WMAppManifest. xml file you can change you app's name and icon as well.


2 Answers

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

widget id="com.xxxxx.yyyyyyyyyyy" android-versionCode="201018"
version="2.1.1"
like image 198
JeromeXoo Avatar answered Sep 28 '22 03:09

JeromeXoo


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">
like image 20
jony89 Avatar answered Sep 28 '22 03:09

jony89