flutterdartbuildapkflutter-android

how to build apk create old version app in Flutter


I am trying to build my release app in Flutter and when I run:

flutter run

everything works fine in debugging and test mode. But when I was trying to build a release app with:

flutter build apk

it creates an old first-release app of mine. That I created before and I try to reset the computer reset android and everything but not work what can I do to reset it and clear the cache? I'm trying almost to delete and reset everything but they don't work. What command that I have to run to fix it and create new version release apk


Solution

  • The solution is easy.
    Just run flutter clean and flutter pub get and then run flutter build apk after that and it generates the updated app apk.
    If you want to install it directly just run flutter install after the build command.