Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 988
javad bat Avatar asked Apr 06 '18 14:04

javad bat


People also ask

How do I change my flutter app version?

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).

Can we develop Android app using flutter?

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.


2 Answers

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.

like image 70
javad bat Avatar answered Sep 20 '22 16:09

javad bat


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

like image 29
Palak Mantry Avatar answered Sep 18 '22 16:09

Palak Mantry