gpt4 book ai didi

android - Problema更新和上传我的apk

转载 作者:行者123 更新时间:2023-11-30 01:20:42 26 4
gpt4 key购买 nike

大家好,这是我对我的应用程序进行的第一次更新...我正在阅读并注意到我需要在 manifest.xml 中更改我的应用程序的版本代码和版本名称,我这样做并单击构建-> 生成签名的 APK 然后在开发者控制台中选择我的应用程序并在左侧菜单中单击 APK 然后上传新的 APK 并选择我新生成的 APK 但我不断收到相同的错误:

Upload error You must use another version code for your APK because you already have a file with the version code 1.

但我不知道为什么我会收到此错误这是我的 manifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ve.net.gorydev.bachaqueofamilia"
android:versionCode="2"
android:versionName="1.1">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>

我应该改变什么??记住这是我的第一次更新

最佳答案

versionCode和versionName也在你的app/build.gradle中定义;在那里定义它们,你应该没有问题。

android {
defaultConfig{
versionCode 2
versionName "1.1"
}
}

关于android - Problema更新和上传我的apk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37152316/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com