How to solve “Your APK's version code needs to be higher than 2.” in Google Play's Developer Console?

后端 未结 16 712
半阙折子戏
半阙折子戏 2020-12-08 09:28

I\'m getting this error when uploading my Phonegap app to the Google Play Developer Console:

Your APK\'s version code needs to be higher than 2.

<
16条回答
  •  臣服心动
    2020-12-08 09:40

    People at android and your users need to just keep track of all the updates so it's required for you to mention the version by updating versionCode and versionName

    Here is how to fix the problem:

    EARLIER

    defaultConfig {
        applicationId "com.example.random.projectname"
        minSdkVersion 15
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
    }
    

    NOW

    defaultConfig {
        applicationId "com.example.random.projectname"
        minSdkVersion 15
        targetSdkVersion 24
        versionCode 2
        versionName "1.0.1"
    }
    

    Remember

    • versionName is what is displayed at bottom of Long Description for the app's user
    • While versionCode is for developer's and google's need and has to be incremented by one always for every new versionName even when you change versionName from v1.0.5 to v1.0.6

提交回复
热议问题