I am uploading new app bundle to play console and it is saying after uploading Version code 1 has already been used. Try another version code.
I have changed version number in pubspec.yaml from version number: 1.0.0+1 to 2.0.0+1 even though it is saying the same error
To update the app version in Flutter, you can simply open the pubspec. yaml file and then update the version tag. Inside the version tag, just increase the build number (for Android) or CFBundleVersion (for iOS).
You have two ways to solve this, if you released your bundle already, then you have to update your version code like in Len_X's answer,
If you're still developing and pushed app bundle for say, testing, and then you delete it, this bundle is saved as a draft with that version code. Therefore, it says that you can't use the same version because it already sees another one with the same version name.
Here's how you fix it:
Hope that solves your problem.
You can do it manually by going to "app_name/android/app/build.gradle" file. In defaultConfig section change version code to a higher number
defaultConfig {
applicationId "com.my.app"
minSdkVersion 23
targetSdkVersion 30
versionCode 1 // Change to a higher number
versionName "1.0.1" // Change to a higher number
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
}
First go to the app/build.gradle
change versionCode
and versionName
like this (+1)
I think this will be helpful for someone ✌😊
For Flutter only:
Goto Pubspec.yaml
file and find version
key and Change the value after the + sign.
For Example:
In your pubspec.yaml file, if your version is like this version: 1.0.0+1
then change it to version: 1.0.0+2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With