简体   繁体   中英

Android Flutter how to set App Version build number

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?

在此处输入图像描述

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM