3

i know this has been ask here

The correct answer is to change the version does not solve my problem id did added this two lines in my manifest

 android:versionCode="2"
 android:versionName="2.01"

but then when i clean and build using android studio the generate the apk again then upload the same error happend ..

Note: I did check that it is the correct file that i try to upload in the developer console

Community
  • 1
  • 1
jameshwart lopez
  • 2,993
  • 6
  • 35
  • 65
  • You should increase your version code by 1 i.e make it 3. Hope it works – surhidamatya Jul 30 '15 at 04:11
  • Possible duplicate of [Upload failed You need to use a different version code for your APK because you already have one with version code 2](https://stackoverflow.com/questions/24772407/upload-failed-you-need-to-use-a-different-version-code-for-your-apk-because-you) – mtkopone Mar 09 '18 at 10:04

3 Answers3

9

In the build.gradle file check if you have versionCode like

 defaultConfig {
    minSdkVersion 10
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
}

because if you have mentioned versionCode in build.gradle file then it will overwrite the values in manifest file. Please make sure if you have mentioned version code here then you have updated here also.

Neeraj Kumar
  • 943
  • 4
  • 16
2

Change it in the build.gradle file of your app module in Android Studio.

Karakuri
  • 38,365
  • 12
  • 84
  • 104
0

Remove those from your manifest. Go to File>Project Structure> And either flavors or build types (don't remember and don't have my pc on me). Set the version name and version code from there.