2

问题 我正在尝试将我的应用程序上传到 google play 商店,但是当我这样做时,我收到一条错误消息,

Upload failed
You need to use a different version code for your APK because you already have one with version code 1.

我不知道这是为什么,因为这是我的应用程序进入谷歌商店的第一个版本。我希望得到一些帮助来解决这个问题!

应用程序.json

{
   "expo": {
    "name": "Phoenix",
    "icon": "./CandidtwoImages/Phoenixlogo.png",
    "version": "0.1.0",
    "slug": "Phoenix",
    "sdkVersion": "21.0.0",
    "ios": {
      "bundleIdentifier": "com.giise.phoenix"
    },
    "android": {
      "package": "com.giise.phoenix"
    }
   }
 }
4

5 回答 5

3

我有同样的问题,这些都没有解决它。

解决方案:

在 app.json

  "expo": {
     expo stuff
  },
  "android": {
     "versionCode": 2   
  },

输入 versionCode 并更新为 2。它必须是整数(注意不是引号)

于 2018-05-09T00:46:50.523 回答
2

您需要在build.gradle中增加versionCode

 defaultConfig {
        minSdkVersion 23
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

versionCode - 用于在 Google Play 上识别版本的内部版本号

versionName - 向用户显示的版本号

详情在这里:https ://developer.android.com/studio/publish/versioning.html

于 2017-11-09T17:11:25.550 回答
0

发生这种情况是因为您第一次上传 APK 时,它会自动设置为版本 1,(在 android studio 中也设置版本 1 - 您可以在 build.gradle 中看到)。因此,您必须先更改 build.gradle 中的版本,而不是生成和上传。不用担心

于 2017-11-09T17:21:28.827 回答
0

要在商店更新您的应用程序,您还需要更新/更改您的版本号。

在世博会上,这可以通过app.json version道具来完成。

要更新您的应用程序,如果您没有更改任何本机数据或 sdkVersion 等,您也可以使用expo 的更新功能。

世博会表格文件

在大多数情况下,当您想要更新您的应用程序时,只需从 exp 或 XDE 再次发布即可。您的用户将在下次打开应用程序时下载新的 JS。您可能想要重建并重新提交本机二进制文件的原因只有几个:

  • If you want to change native metadata like the app’s name or icon
  • If you upgrade to a newer sdkVersion of your app (which requires new native code)

To keep track of this, you can also update the binary’s versionCode and buildNumber. It is a good idea to glance through the app.json documentation to get an idea of all the properties you can change, e.g. the icons, deep linking url scheme, handset/tablet support, and a lot more.

于 2017-11-09T18:18:05.207 回答
-1

使用新版本代码更改 AndroidManifest 文件。

<manifest 
          android:versionCode="1.1"
          android:versionName="1.1">
于 2017-11-09T17:12:48.660 回答