version code not changing of APK or Android App Bundle in the flutter. Even after changing it from pubspec.yaml

Viewed 829

Version Code not changing

In my appBundle version code is not changing even after changing the code in pubspec.yaml

version: 1.0.0+4

But its showing the same error while uploading the app in the google playstore.

Playstore Error

What to do now. I can change the version code from the android file in the build.gradle->.

defaultConfig {
    ...
    ....
    versionCode 4
    versionName flutterVersionName
    ....
}

But I want to change it from the pubspec.yaml.

1 Answers

Try adding --build-name=1.0.0 --build-number=1 when you're building your apk.

For example: flutter build apk --split-per-abi --build-name=1.0.0 --build-number=1

Related