Run First Application
Learn to run your first application on a mobile or android emulator. In this tutorial you will learn about running and debugging the app.
After writing your first Flutter App, it's time to run it on an emulator or physical device. To set up an emulator or physical device with IDE, follow the steps below.
Set up Android Emulator:
On Android Studio, go to
Tools > AVD Manager, and click on "Create Virtual Device".
Choose the device model, and click on "Next".
Now, there you will see the list of recommended files, API, SDK, tools to download, and again click on "Next". After that, give name to your emulator and finally click on "Finish".
After configuration, you will see the list of emulators, click on the "Play" button to run an emulator. You much have a running emulator to run your application.
In this way, you can set up an Android emulator using android studio.
Setup Physical Device:
To set up a physical device, you need to turn on "Debug mode" from settings.
After everything is configured, run the command below on the terminal.
It will show if there is any device connected or configured to run flutter apps.
Now run your flutter app using the commands below:
This command will run your Flutter app on debug mode on the active emulator or physical android device. Your app will be slow in debug mode.
Run the command below to run your Flutter app on release mode. Your app will have an actual performance on release mode.
flutter run --release
On debug mode, you can hot + restart or hot + reload to see the changes done by your code on UI. Press "
Ctrl + r" to hot restart, or just "
r" to hot reload.