"You need to use a different version code for your APK or Android App Bundle" No matter what version code set
Asked Answered
D

8

12

I am trying to upload a new update for the beta version of my last app on google play store.

I've tried several version codes, 1,2,3,29 !! But no matter what version code is set, it shows this error

Upload failed You need to use a different version code for your APK or Android App Bundle because you already have one with version code 29

please note that the last version of the app is actually 1.

Here is a part of my gradle app

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.company.myapp"
        minSdkVersion 18
        targetSdkVersion 28
        versionCode 29
        versionName "29.2.5"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}
Dusen answered 19/6, 2019 at 19:36 Comment(0)
D
9

It was strange to find the solution, that the problem is not that the app is not being accepted on play store, but some double upload happened because of the bad internet connection, so that the app is keep uploading again, after it is being already uploaded.

I noticed that after finishing the upload it shows again 99% uploading, then the error occured.

When I checked after 2 days, I found that those versions 2,3,29 have been successfully uploaded !

So It is not an issue in the bundle or apk, but on google console in uploading process handling slow internet connections.

Dusen answered 21/6, 2019 at 17:45 Comment(1)
For such case, you can use "Add From Library" option instead of "Upload". By clicking "Add From Library" you will get list of all uploaded build, you can find the latest uploaded version.Epigene
V
24

Google play sidebar

try to explore Artifact library at the sidebar , you can delete your previous uploaded app and then reupload your new app .

Voluntarism answered 25/11, 2019 at 13:35 Comment(4)
I didn't see anything in the Artifact library to delete the previous versions.Supportive
@Supportive you might have published your apk to liveVoluntarism
@Voluntarism Is it now called "App bundle explorer"?Kilburn
it's called app bundle explorer now and I think this one should be the better answerConk
D
9

It was strange to find the solution, that the problem is not that the app is not being accepted on play store, but some double upload happened because of the bad internet connection, so that the app is keep uploading again, after it is being already uploaded.

I noticed that after finishing the upload it shows again 99% uploading, then the error occured.

When I checked after 2 days, I found that those versions 2,3,29 have been successfully uploaded !

So It is not an issue in the bundle or apk, but on google console in uploading process handling slow internet connections.

Dusen answered 21/6, 2019 at 17:45 Comment(1)
For such case, you can use "Add From Library" option instead of "Upload". By clicking "Add From Library" you will get list of all uploaded build, you can find the latest uploaded version.Epigene
S
4

When you see this error, scroll down and click save, Open Artifact Library from left side panel, Find your uploaded APK and remove, Reupload the same APK

Saretta answered 11/8, 2020 at 8:9 Comment(0)
M
3

go to App Bunder Explorer at the sidebar and delete your previous uploaded app and then re-upload your new app.

Magner answered 30/12, 2020 at 15:10 Comment(0)
E
2

For flutter users, you have to change the version in pubsec.yaml and not in the android folders.

version:A.B.C+X
eg: 1.0.0+2

x is the version code and a, b, c are version name.

Do not forget to execute flutter build ipa or flutter run after this step.

Engineman answered 5/2, 2021 at 14:2 Comment(0)
H
2

If you're developing using Flutter:

version:A.B.C+X
eg: 1.0.0+2

Modifying X is a must because X is the version code. Then run:

flutter pub get
flutter clean
flutter build appbundle

It worked for me.

Humpy answered 22/3, 2021 at 20:6 Comment(0)
E
1

For flutter users, u can also try directly replacing the version code in android projects build.gradle of app like this :

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
    flutterVersionCode = '7'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
    flutterVersionName = '1.2.1'
}

with this:

def flutterVersionCode = '7'

def flutterVersionName = '1.2.1'

Be sure to update it next time.

Engineman answered 23/5, 2021 at 6:31 Comment(0)
E
0

Just after a successful build, with the success message you get two options: Locate and Analyze. Click Analyze, it shows you the version, and there check if the issue is with android studio.

Engineman answered 26/3, 2021 at 17:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.