【问题标题】:Your APK's version code needs to be higher than xxx phonegap您的 APK 版本代码需要高于 xxx phonegap
【发布时间】:2016-09-07 11:54:56
【问题描述】:

我正在使用 phonegap 在 Itunes 和 Google play 上部署我的应用程序。我的配置文件如下所示

<widget 
xmlns="http://www.w3.org/ns/widgets" 
xmlns:gap="http://phonegap.com/ns/1.0" 
id="com.crondale.tippnett" 
version="1.1.13">
<name>TippNett</name>
<description>TippNett er et system for å som bidrar til bedre massebalanse.    Systemet finner anlegg i nærheten med motsatt massebehov. Det bidrar til kortere kjørelengde og raskere anleggsutførsel. Du sparer penger, i tillegg til at miljøet blir spart for CO2 utslipp.</description>
<author href="http://www.crondale.com" email="support@crondale.com">Crondale</author>
<content src="index.html" />
<access origin="*" />

<preference name="SplashScreen" value="screen" />
<preference name="windows-target-version" value="8.0" />
<preference name="windows-phone-target-version" value="8.1" />
<preference name="target-device" value="universal" />



 <platform name="android">
    <preference name="orientation" value="portrait" />
</platform>

<platform name="ios">
    <preference name="orientation" value="portrait" />
</platform>

<preference name="android-build-tool" value="gradle" />

<gap:plugin name="cordova-plugin-whitelist" source="npm" version="1.0.0" />
<gap:plugin name="cordova-plugin-device" source="npm" version="1.0.1" />
<gap:plugin name="cordova-plugin-inappbrowser" source="npm" version="1.4.0" />
<gap:plugin name="cordova-plugin-network-information" source="npm" version="1.2.1" />

<gap:plugin name="cordova-plugin-geolocation" source="npm"/>

<icon src="icon.png" />
<icon src="res/icons/android/icon-36-ldpi.png" gap:platform="android" gap:qualifier="ldpi" />
<icon src="res/icons/android/icon-48-mdpi.png" gap:platform="android" gap:qualifier="mdpi" />
<icon src="res/icons/android/icon-72-hdpi.png" gap:platform="android" gap:qualifier="hdpi" />
<icon src="res/icons/android/icon-96-xhdpi.png" gap:platform="android" gap:qualifier="xhdpi" />
<icon src="res/icons/ios/icon-40.png" gap:platform="ios" width="40" height="40" /> 
<icon src="res/icons/ios/icon-40-2x.png" gap:platform="ios" width="80" height="80" /> 
<icon src="res/icons/ios/icon-60.png" gap:platform="ios" width="60" height="60" /> 
<icon src="res/icons/ios/icon-60-2x.png" gap:platform="ios" width="120" height="120" /> 
<!-- iPad --> 
<icon src="res/icons/ios/icon-76.png" gap:platform="ios" width="76" height="76" /> 
<icon src="res/icons/ios/icon-76-2x.png" gap:platform="ios" width="152" height="152" /> 
....
</widget>

但是当我尝试在谷歌开发者控制台上上传 apk 文件时,我得到了这个错误

Your APK's version code needs to be higher than 3718.

我的应用当前版本是3718,版本是1.1.12。

版本不是 1.1.13,但显然我上传的 apk 也有 3718 版本。我该如何解决这个问题?我以前不必这样做。

【问题讨论】:

  • 在清单文件中进行更改。
  • 但是我以前上传我的应用程序时没有接触过清单文件。还有清单文件在哪里?
  • platforms/android/AndroidManifest.xml
  • 我那里没有任何 Manifest 文件。我确实有 android.iml
  • 发布您的答案并标记为已回答:)

标签: android cordova phonegap-build


【解决方案1】:

Cordova v5 生成 6 位的 android:versionCode=XXXXXX,但在最新的 Cordova v6 中,它生成 5 位的 versionCode,而且总是更低。您需要在 config.xml 中添加它并手动更新它,以便它生成您想要的确切内容。

<widget id="com.xxx.xxx"  android-versionCode="300001" version="3.0.1">

希望这能解决您的问题。

【讨论】:

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