导出 android apk 时版本代码错误
Version code error in exporting android apk
我在 Play 商店中有一个应用程序。它的版本代码是18。
现在在应用程序中进行了更新并将版本代码更改为 19。
无法上传 apk 显示错误。
This configuration cannot be published for the following reason(s):
Version 18 is not served to any device configuration: all devices that
might receive version 18 would receive version 28.
Some devices are
eligible to run multiple APKs. In such a scenario, the device will
receive the APK with the higher version code.
当我检查 AndroidManifest.xml 文件时,它在版本代码部分显示错误
This versionCode value (18) is not used; it is always overridden by
the value specified in the Gradle build script (28) less... (Ctrl+F1)
The value of (for example) minSdkVersion is only used if it is not
specified in the build.gradle build scripts. When specified in the
Gradle build scripts, the manifest value is ignored and can be
misleading, so should be removed to avoid ambiguity.
实际上我是 android 开发的菜鸟。你们能帮帮我吗?
从您的 android 清单中删除版本代码,仅将其保留在 gradle 文件中。
转到您的模块的 Build.Gradle。
找到类似于以下内容的一行:
versionCode xx
"xx" 将是一个整数。
删除它。
重建您的项目。
或者从您的清单中删除它,只在您的 Build.Gradle 文件中管理它。
如果在您的 Build.Gradle 和清单文件中都定义了某个字段,则 Build.Gradle 会覆盖清单文件。
如果您不熟悉 Gradle,您应该熟悉它。它非常强大,如果您不了解它的工作原理,可能会引起头痛。 Learn more here.
确保您有 build.gradle(对于应用程序)sync-ed
我在 Play 商店中有一个应用程序。它的版本代码是18。 现在在应用程序中进行了更新并将版本代码更改为 19。 无法上传 apk 显示错误。
This configuration cannot be published for the following reason(s): Version 18 is not served to any device configuration: all devices that might receive version 18 would receive version 28.
Some devices are eligible to run multiple APKs. In such a scenario, the device will receive the APK with the higher version code.
当我检查 AndroidManifest.xml 文件时,它在版本代码部分显示错误
This versionCode value (18) is not used; it is always overridden by the value specified in the Gradle build script (28) less... (Ctrl+F1)
The value of (for example) minSdkVersion is only used if it is not specified in the build.gradle build scripts. When specified in the Gradle build scripts, the manifest value is ignored and can be misleading, so should be removed to avoid ambiguity.
实际上我是 android 开发的菜鸟。你们能帮帮我吗?
从您的 android 清单中删除版本代码,仅将其保留在 gradle 文件中。
转到您的模块的 Build.Gradle。
找到类似于以下内容的一行:
versionCode xx
"xx" 将是一个整数。
删除它。 重建您的项目。
或者从您的清单中删除它,只在您的 Build.Gradle 文件中管理它。
如果在您的 Build.Gradle 和清单文件中都定义了某个字段,则 Build.Gradle 会覆盖清单文件。
如果您不熟悉 Gradle,您应该熟悉它。它非常强大,如果您不了解它的工作原理,可能会引起头痛。 Learn more here.
确保您有 build.gradle(对于应用程序)sync-ed