Android Flutter how to set App Version build number

Viewed 45

On Google Play I have my mobile application with version 20220822. Now I try upload new version with symbol 20220904 but my build is refused by Google play. It looks like app version is not changed in .aab bundle. I change version in file BuildConfig.java to:

public static final int VERSION_CODE = 20220904;

And in pubspec.yaml:

version: 0.2.122+20220904

but my build still is rejected by Google Play. Where I must change build number?

enter image description here

1 Answers

I found temporary workaround. In file build.grade I change automated version to constant value:

    defaultConfig {
        minSdkVersion 21
        targetSdkVersion flutter.targetSdkVersion
        versionCode 20220905 //flutterVersionCode.toInteger()
        versionName "0.2.123" //flutterVersionName
    }

As I wrote this in question, my pubspec contains version: 0.2.122+20220905 but Google Play said that I send version 20220822.

Related