Android 您需要为APK使用不同的版本代码,因为您已经有一个版本代码为1的版本。如何更改版本?

Android 您需要为APK使用不同的版本代码,因为您已经有一个版本代码为1的版本。如何更改版本?,android,css,google-play,google-play-services,Android,Css,Google Play,Google Play Services,我正试图上传我的apk在谷歌播放。apk文件是unity3d。谷歌游戏不会让我是我已经有了版本。我在google play上收到这条消息。你需要为你的APK使用不同的版本代码,因为你已经有一个版本代码为1的版本。我已重建项目,并将版本更改为2。我还对android清单脚本进行了更改,但仍然无法上传apk文件。以下是我为上传到google play而修改的脚本: { 无论您的版本代码是什么..按1添加它 android:versionCode="X + 1" 它位于gradle文件中,并写入清

我正试图上传我的apk在谷歌播放。apk文件是unity3d。谷歌游戏不会让我是我已经有了版本。我在google play上收到这条消息。你需要为你的APK使用不同的版本代码,因为你已经有一个版本代码为1的版本。我已重建项目,并将版本更改为2。我还对android清单脚本进行了更改,但仍然无法上传apk文件。以下是我为上传到google play而修改的脚本:

{


无论您的版本代码是什么..按1添加它

android:versionCode="X + 1"

它位于gradle文件中,并写入清单(如果您不使用gradle)。

只需更改清单中的版本代码。您当前的版本代码为2,将其更改为3

替换

android:versionCode=“2”

android:versionCode=“3”

每次上载新版本时,将versionCode增加1

您还应该尝试在build.gradle中修改versionCode和versionName

defaultConfig {
    applicationId "com.you.yourpackage"
    minSdkVersion XX
    targetSdkVersion XX
    versionCode 3      // new versionCode
    versionName "1.7"  // new versionName
}