【问题标题】:Need to use different version code, PhoneGap需要使用不同的版本代码,PhoneGap
【发布时间】:2015-05-08 16:36:55
【问题描述】:

我在尝试将新版本的 APK 上传到 Google Play 时收到重复版本代码错误。我正在使用 build.phonegap.com,我做了一些研究,发现它是 AndroidManifest.xml 文件或 config.xml 文件。我已经手动尝试使用 Sublime Text 2 编辑这些(我的 config.xml 在 /platforms/android/assets/www 中),但我编辑的任何内容似乎都不起作用。该版本最初是 2.1.1 和 VersionCode 20101。

有没有人知道如何解决这个问题并修复我的 VersionCode 以便我可以上传它?

config.xml:

<?xml version='1.0' encoding='utf-8'?>
<widget xmlns="http://www.w3.org/ns/widgets" 
    xmlns:gap="http://phonegap.com/ns/1.0"
    id="final.com.treatfinder" 
    version="2.1.2" >
<name>MedicineFinder</name>
<feature name="http://api.phonegap.com/1.0/device" />

AndroidManifest.xml:

<?xml version='1.0' encoding='utf-8'?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="final.com.treatfinder"
    android:hardwareAccelerated="true"
    android:versionCode="20103"
    android:versionName="2.1.2"
    android:windowSoftInputMode="adjustPan">

【问题讨论】:

  • 还有config.xml文件,里面也有版本号。检查

标签: android xml cordova


【解决方案1】:

尝试将versionCode 添加到您的config.xml:

<?xml version='1.0' encoding='utf-8'?>
<widget xmlns="http://www.w3.org/ns/widgets" 
    xmlns:gap="http://phonegap.com/ns/1.0"
    id="final.com.treatfinder" 
    versionCode="20103"
    version="2.1.2" >
<name>MedicineFinder</name>
<feature name="http://api.phonegap.com/1.0/device" />

versionCode:(可选)在为 Android 构建时,您可以设置 通过在 config.xml 中指定 versionCode。

参考:http://docs.build.phonegap.com/en_US/3.1.0/configuring_basics.md.html#The%20Basics

【讨论】:

    【解决方案2】:

    发现问题。虽然我更新了 AndroidManifest.xml 和 Config.xml,但您的 VersionCode必须是增量的。例如,如果显示 3 in use,则必须使用 4。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-07-24
      • 2017-12-19
      • 2015-10-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多