Upload failed You need to use a different version code for your APK because you already have one with version code 2

后端 未结 19 1304
温柔的废话
温柔的废话 2020-12-22 20:59

According to this answer How to solve "Your APK's version code needs to be higher than 2." in Google Play's Developer Console? I have just changed the vers

相关标签:
19条回答
  • 2020-12-22 21:08

    I kept getting same error again and again,

    Finally I uploaded the apk file manually using Google Play Console as shown in screen shot.

    Under App Release, You select the button "CREATE RELEASE" shown in the screen shot and upload your apk file from /android/app/bin/build/outputs/apk/release/app-release.apk

    0 讨论(0)
  • 2020-12-22 21:10

    if you are using ionic framework, go to config.xml file and change the "version" attribute in the "widget" tag. increase the version number. then rebuild, sign and upload ur apk to play store. that fixed my problem.

    0 讨论(0)
  • 2020-12-22 21:10

    I received the same error while uploading a flutter app to playstore simply change the version code in pubspec.yaml worked for me. may be try changing the version code e.g from +1 to +2 and then rebuild the apk using

    flutter build apk --split-per-abi 
    

    and upload all the apk's to the playstore for your users. Next time when you want to push an update make sure to update the version code to +3 and so on.

    Note: that the version code and version name are different you can see that in android/local.properties file. e.g version: 1.0.0+2

    version is 1.0.0 and verison code is +2

    0 讨论(0)
  • 2020-12-22 21:11

    This error appears when you try to upload an apk that has same version values as the one already on playstore.

    Just change the following in your build.gradle file => versionCode and versionName

    defaultConfig {
        applicationId "com.my.packageId"
        minSdkVersion 16
        targetSdkVersion 27
        versionCode 2      <-- increment this by 1
        versionName "2.0"  <-- this is the version that shows up in playstore, 
                               remember that the versioning scheme goes as follows.
                               first digit = major breaking changes version
                               second digit = minor changes version
                               third digit = minor patches and bug fixes.
                               e.g versionName "2.0.1"
    }
    
    0 讨论(0)
  • 2020-12-22 21:11

    (For Flutter App) You need to use a different version code for your APK or Android App Bundle because you already have one with version code 1.

    Don't be panic...

    You need to change in Flutter Version from pubspec.yaml file and Version Code from local.properties file.

    First go to your pubspec.yaml file. The first three lines should be name, description and version of App.

    Before Release -

    For you the version might look something like this:

    version: 1.0.0+1

    So before creating an apk for release (for update your exiting app on Google Play Console i.e for new update) make sure you increment this number by 1. (You should increment it as there's no requirement on increment step) .

    Solution

    Just change that version to (As per your need )

    version: 1.0.1+2

    And Second if

    flutter.versionCode in Project -> android -> local.properties is

    flutter.versionCode=1 then change it or upgrade it to the flutter.versionCode=2 or any other greater number than previous code.

    And finally release the app as per documentation.

    0 讨论(0)
  • 2020-12-22 21:11

    Just as Martin Konecny's answer said, you need to change the versionCode to something higher.

    Your previous version code was 28. it should be changed to 29.

    According to the document on the android developer website. a version code is

    An integer value that represents the version of the application code, relative to other versions.

    So it should be related(by related I mean higher) to the previous versionCode as noted by the document:

    you should make sure that each successive release of your application uses a greater value.

    As mentioned again in the document

    the android:versionCode value does not necessarily have a strong resemblance to the application release version that is visible to the user (see android:versionName, below)

    So even though this is the release 2.0001 of your app, it does not necessarily mean that the versionCode is 2.

    Hope this helps :)

    0 讨论(0)
提交回复
热议问题