我正在尝试上传 .apk
在 GooglePlayConsole 上。这个.apk
使用 Expo 生成(并用 React-Native 编码)。
第一次,我默认生成的,得到的是codeVersion: 1
(这基本上是一批权限)。然而,我的.apk
由于“不需要此权限”而未经授权。
所以我重建了.apk
使用另一个代码版本(没有任何权限),应该得到批准。但是,当我尝试上传.apk
时在 GooglePlayConsole 上(我之前的操作未获批准),我收到一条错误消息:
You should use another code version for your APK or Andoid App Bundle. The code 1 is already use by another APK or Android App Bundle.
但我不知道在哪里(或是否)可以更改 GooglePlayConsole 上应用程序的代码版本。
我考虑过删除该应用,但一旦被拒绝就不可能了。
有截图:https://puu.sh/CFAQS/ff43b0ccb8.png
谢谢。
最佳答案
更改gradle应用程序中的versionCode:
android {
compileSdkVersion 28
defaultConfig {
applicationId "applicationId"
minSdkVersion 21
targetSdkVersion 28
versionCode 1 ----- Here you should change your versionCode
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
关于java - 在 Google Play 管理中心更改应用程序的代码版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54479018/