Problem with version number in Flutter / pubspec.yaml

270

Solution 1

You should increment version code always as it is used to identify and push updates internally. You can use any version name which is shown on the play store listing but must increment the number following the plus sign, that is version code.

version: 2.0.3+21

Solution 2

The version code is two different numbers. For exemple, in 2.0.2+20, 2.0.2 and 20 are two different parts. Google Play uses the 20, so you must always increment it.

Solution 3

+20 and +1 at the end of your version represent the build number, 2.0.x is the build name.

What you need is to keep incrementing the build number (+1, +2, +3...) which each deploy to the stores.

And then use the first part x.x.x (2.0.3 for example) for naming the version you are trying to deploy.

Share:
270
derChris
Author by

derChris

Updated on January 03, 2023

Comments

  • derChris
    derChris over 1 year

    I built an app with

    version: 2.0.2+20
    

    in the pubspec.yaml

    and everything (distribution and GooglePlay) worked.

    Changing it to

    version: 2.0.3+1
    

    I get the error in the Goolge Play Console

    Version code 1 has already been used. Try another version code.

    I thought I can have a release "2.0.1+1" and later "2.0.2+1" and so on. Am I wrong? And if not - what couöd cause my problem?