This guide provides step-by-step instructions to install Flutter and run a Flutter app on an Android emulator.
Before you begin, make sure you have the following installed on your system:
- Flutter SDK: Install Flutter
- Android Studio: Install Android Studio
- Flutter and Dart plugins for your preferred IDE: Install plugins for VS Code or IntelliJ/Android Studio
Follow the instructions on the official Flutter installation page to download and install the Flutter SDK on your machine.
- VS Code: Install the Flutter and Dart extensions.
- IntelliJ/Android Studio: Install the Flutter and Dart plugins.
Run the following command in your terminal to ensure Flutter is properly configured:
flutter doctor
Fix any issues reported by flutter doctor before proceeding.
Navigate to your Flutter project directory and run:
flutter pub get
This command installs the dependencies specified in your pubspec.yaml file.
Open Android Studio and launch the Android Virtual Device (AVD) manager. Create a new virtual device if you haven't already.
Use the following command to run your Flutter app on the Android emulator or alternatively, use the specific run buttons on Flutter supported IDE.
flutter run
That's it, it will build and run the Flutter app on the Android Emulator.