1

I've done this before, but quite a long time a go

For what I remember, setting version attribute in config.xml, that was it

The thing is that I had

<widget id="com.toniweb.appname" version="1.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

And changed to:

<widget id="com.toniweb.appname" version="1.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

But when I upload the signed version to google play, I got this error:

"El código de versión del APK debe ser superior a (Version of code must be greater than) 1100101008."

And searched in the code and yes, in fact, it isn't updated even if changing the version attribute

I build the .apk like this:

cordova prepare
cordova build --release android

And I sign it like this:

jarsigner -verbose -sigalg SHxxxxxxSA -digestalg SHA1 -keystore ../apk/android-release-unsigned.keystore  android-release-unsigned.apk appnameAndroidKey
android-release-unsigned.apk appname1.2.apk

Any idea what I'm missing?

Toni Michel Caubet
  • 19,333
  • 56
  • 202
  • 378

2 Answers2

2

Go to your AndroidManifest.xml and increase android:versionCode and android:versionName.To know how to increase you can go to this reference link.

If you are using cordova make change in config.xml .As you previous version is 1.100111,Change it to 1.100112 or 1.200000. After that build your application again.

Community
  • 1
  • 1
Homen
  • 1,222
  • 1
  • 12
  • 16
-1

Before copying platform files for building, first cleanup project from build artifacts : cordova clean

And after that build your project : cordova build

Maybe by cleaning old artifacts your problem will be solved.

Ali Khatami
  • 369
  • 2
  • 16