0

Play console is giving error "Use different Version Code".

I have tried everything. Changing the version code in the pubspec.yaml to 2.0.1+2. And then running pub get Changing the version code in the local.properties file. Flutter Clean and then build the release. Even then Play Console is giving error. enter image description here

1 Answer 1

2

I Was also facing the same problem, and later got to know that my version code was defined statically in my build.gradle file.

Go To Android -> App -> build.gradle file

And To Change it from there Please check your build.gradle file, is the version Code coming from flutterVersionCode or is it defined statically?

defaultConfig { //... versionCode flutterVersionCode.toInteger() //See this line, is it same as mine or you have any static version Code set there which is causing the issue. versionName flutterVersionName } 
Sign up to request clarification or add additional context in comments.

1 Comment

Yeah Well just before reading your answer I saw this defaultConfig block and it version code was defined statically to 1 so I changed it to 2. LOL I also did it statically but now I know the right way. Thanks alot

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.