APK的不同版本代码,带有phonegap构建的Android应用程序

rah*_*lsn 6 java android google-play cordova

当我尝试在Google Play上传我的应用时,会显示以下错误消息:

You need to use a different version code for your APK because you already have one with version code 1.
Run Code Online (Sandbox Code Playgroud)

我从我的phonegap版本下载我的APK.

我的问题是:

我可以在哪个文件中更改版本号?

我试图改变androidmanifest.xml,版本代码和版本名称

谢谢!

Tar*_*lah 8

您应该在"config.xml"中指定版本代码属性,请注意版本代码属性应该类似于android-versionCode ="2",如下例所示:

<?xml version='1.0' encoding='utf-8'?>
<widget id="ca.anything.anything.any"
    android-versionCode="2"
    version="1.0.3"
    xmlns="http://www.w3.org/ns/widgets"
    xmlns:cdv="http://cordova.apache.org/ns/1.0"
    xmlns:rim="http://www.blackberry.com/ns/widgets">
    <name>Application Name</name>
....
</widget>
Run Code Online (Sandbox Code Playgroud)


jom*_*mni 5

上传到PhoneGap Build时,不包括清单文件.尝试更改PhoneGap的config.xml中的version和versionCode属性.