0

I´m writing a flutter application and it is currently on version 0.7.0, I already specified the version in pubspec.yaml and the Debug APK is already on the updated version, but the release APK it´s not updating, even after 'flutter build apk' or 'flutter run --release'.

Release APK:

Release APK

As you can see on the image the Version name is 0.6.0 instead of 0.7.0

Debug APK:

Debug APK

In debug apk the version is 0.7.0

pubspec.yaml:

pubspec.yaml

  • Project repository in github
ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96
  • is running `flutter clean` gives any help? – ישו אוהב אותך Apr 27 '21 at 14:10
  • i tried 'flutter clen', but still not updating the version – Pedro Xavier Apr 27 '21 at 14:12
  • try running `flutter pub get` first. Then check your `versionName` and `versionCode` in the `local.properties` file in android folder. – ישו אוהב אותך Apr 27 '21 at 14:16
  • so, I runned pub get, then on the local.properties the versionName is 0.7.0 but it didn´t have the versionCode. I clicked on the AndroidManifest.xml that shows in the .apk screen and the versionCode is diferent, idk if it´s auto-generated, I tried to change the AndroidManifest inside Android folder but the final AndroidManifest still with version 0.6.0 – Pedro Xavier Apr 27 '21 at 14:24
  • try change the version to `version: 0.7.0+1`. Or like @jordan-kotiadis says, try `version: 0.7.0+2`. This seems related: https://stackoverflow.com/questions/53570575/flutter-upgrade-the-version-code-for-play-store – ישו אוהב אותך Apr 27 '21 at 14:30
  • you need to change the version in your `pubspec.yaml`. change `version: 0.7.0` line to `version: 0.7.0+2` – ישו אוהב אותך Apr 27 '21 at 15:12

3 Answers3

1

So, even after changing codeVersion dind´t worked.

Solution

But I founded a solution, just deleted the build bin and then runned flutter build apk.

0

You have to change also the version code from 1 to 2

Jordan Kotiadis
  • 558
  • 6
  • 21
0

I just fixed it with running flutter build apk in flutter project and open android flutter project in android studio and generate singned apk in android studio