如何更新应用程序版本在Cordova [英] How to update app version in Cordova
问题描述
我以前做过,但很长一段时间了
对于我记得,在config.xml中设置版本属性, p>
事情是我有
< widget id =com .toniweb.appnameversion =1.1xmlns =http://www.w3.org/ns/widgetsxmlns:cdv =http://cordova.apache.org/ns/1.0>
并更改为:
< widget id =com.toniweb.appnameversion =1.2xmlns =http://www.w3.org/ns/widgetsxmlns:cdv =http:// cordova.apache.org/ns/1.0\">
但是当我将签名版本上传到google play时,我遇到了这个错误:
Elcódigodeversióndel APK debe ser superior a(版本代码必须大于)1100101008
< blockquote>
在代码中搜索,是的,事实上,即使更改版本属性也不会更新
我这样构建.apk:
cordova准备
cordova build --release android
我这样签名:
jarsigner -verbose -sigalg SHxxxxxxSA -digestalg SHA1 -keystore ../apk/android-release-unsigned.keystore android-release-unsigned.apk appnameAndroidKey
android-release-unsigned.apk appname1.2。 apk
任何想法我错过了什么?
c>并添加
android:versionCode
和android:versionName
。要了解如何增加您可以转到此参考链接。
如果您使用cordova,请在config.xml中进行更改。与先前版本为1.100111相同,将其更改为1.100112或1.200000。
之后,再次构建您的应用程序。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?
解决方案Go to your
AndroidManifest.xml
and increaseandroid:versionCode
andandroid: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.
这篇关于如何更新应用程序版本在Cordova的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文