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
How to update app version in Flutter. 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).
Flutter is a recently launched SDK by Google, allowing developers to create applications for iOS and Android by using a single code-base. Unlike other popular solutions, rather than calling Flutter a framework, it is a complete SDK that comes with everything that you will need to build cross-platform applications.
the solution is easy.
just run flutter clean
and run flutter build apk
after that and it generate update app apk.
if you want to install it directly just run flutter install
after the build command.
To all the beginners If you wish to release an apk of a flutter app just do: flutter run --release (and make sure to connect your device to a phone) steps to ensure your phone is connected: 1. enable usb debugging mode in your phone 2.click on version number of your phone in system settings to enter into developer mode 3. change the phone mode to transferring file mode
After you run the command go to build->apps->output->apk
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