在开发者控制台上更新新APK时出错

问题描述 投票:1回答:2

我一直在尝试使用新版本更新我的应用程序,我在开发人员控制台上遇到了这个问题。我有这样的错误:

我检查了我之前版本的版本,看看我做错了什么,但它是一样的。

这是我更新的xml文件

<application
        android:allowBackup="true"
        android:id="@+id/title"
        android:icon="@mipmap/iron"
        android:label="@string/app_name"
        android:theme="@style/AppTheme"
        android:versionCode="100"
        android:versionName="2.0"
        >
android
2个回答
3
投票

看起来你已经在Play商店中拥有版本1。为了能够更新它,您需要更改Android项目中build.gradle文件中的版本号。

同步您的项目,然后生成新的APK。

我怀疑只是更新清单会起作用。


-1
投票

要动态定义您的应用版本,请使用def指定自定义方法并将其调用,例如在.gradle中:

def computeVersionName() {
    return "2.0"
}

android {
    compileSdkVersion 19
    buildToolsVersion "19.0.0"

    defaultConfig {
        versionCode 12
        versionName computeVersionName()
        minSdkVersion 16
        targetSdkVersion 16
    }
}
© www.soinside.com 2019 - 2024. All rights reserved.