Development of mobile applications using Flutter is becoming increasingly popular due to the ability to create cross-platform solutions with a single code base. However, before you start creating your first project, you need to properly set up your working environment. Android Studio is the official IDE from Google for development under Android, but it also integrates perfectly with Flutter SDK, turning into a powerful tool for creating applications for both platforms: Android i iOS.
Many beginners encounter difficulties at the installation stage: from version incompatibility to configuration errors. In this article, we will walk you through the process step by step, from checking system requirements to the first build of a test project. You will learn how to avoid common mistakes, which plugins can speed up your work, and what to do if flutter doctor shows problems. And if you have already tried to install Flutter earlier, but something went wrong, here you will find solutions to the most common problems.
Important: the installation process may vary slightly depending on the operating system (Windows, macOS or Linux), but the basic principles remain unchanged. We will focus on Windows as the most common platform among developers, but at key points we will indicate features for other OS.
1. Checking system requirements before installation
Before proceeding with installation, make sure that your computer meets the minimum requirements. Flutter and Android Studio make rather modest requests for hardware, but some nuances are still worth considering:
- ๐ฅ๏ธ Operating system: Windows 10/11 (64-bit), macOS (from Catalina 10.15 and newer), Linux (64-bit, distributions based on Debian/Ubuntu or Fedora).
- ๐พ Free disk space: no less
2.8 GB(only for Flutter SDK) +1.5โ3 GBfor Android Studio and emulators. - ๐ง RAM: minimum
8 GB(recommended16 GBfor comfortable work with emulators). - ๐ง Additional software: Git (for cloning repositories), Python 3.x (for some tools Android SDK).
Particular attention should be paid virtualization. If you plan to use Android Emulator, make sure that BIOS support is enabled VT-x (for Intel) or AMD-V (for AMD). Without this, the emulator will work extremely slowly or will not start at all. You can check virtualization support through Task Manager โ Performance โ CPU (the "Virtualization" line).
โ ๏ธ Attention: On Windows antivirus apps (for example, Avast or Kaspersky) can block work flutter.bat. Add the folder with Flutter SDK to exceptions or temporarily disable protection during installation.
| Component | Minimum version | Recommended version |
|---|---|---|
| Android Studio | Giraffe (2022.3.1) | Electric Eel (2023.1.1) or later |
| Flutter SDK | 3.10.x |
3.19.x (stable channel) |
| Java JDK | OpenJDK 11 | OpenJDK 17 (for full compatibility with Android Gradle Plugin 8.x) |
| Git | 2.14.x |
2.40.x or later |
2. Installing and configuring Android Studio
If you have not yet installed Android Studio, download the latest version from official website. Select the option "Standard" โit includes all the necessary components, including Android SDK and the emulator:
- ๐ฅ Check the box
Android Virtual Device(to create emulators). - ๐ง Make sure that the installation path does not contain Cyrillic characters or spaces (for example,
C:\Android\AndroidStudio). - ๐ Leave the checkbox on
Add to PATH(this will make it easier to launch from the command line).
After installation, run Android Studio and wait for the initial setup to complete. Then go to Configure โ SDK Manager and install:
Install Android SDK Platform (latest version)|Download Android SDK Command-line Tools|Select Android 13 (Tiramisu) or newer in SDK Platforms|Install Google APIs Intel x86 Atom System Image for emulator-->
For correct operation Flutter you will also need to configure the environment variables In Windows open Control Panel โ System โ Advanced system settings โ Environment variables and add:
ANDROID_HOME = C:\Users\YourName\AppData\Local\Android\Sdk
PATH = %ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools;%ANDROID_HOME%\tools\bin
โ ๏ธ Attention: If you are updating Android Studio from the old version, remove old paths fromPATHto avoid conflicts. For example, outdated versionsplatform-toolsmay cause errors when building projects.
3. Downloading and installing Flutter SDK
The official installation method Flutter is cloning the repository from GitHub. Open a command line (Win + R โ cmd) and run:
git clone https://github.com/flutter/flutter.git -b stable
This command will download the latest stable version Flutter to the current folder. An alternative option is to download the archive from official website and unpack it into a folder without spaces (for example, C:\src\flutter).
After downloading, add the path to flutter\bin to a variable PATH (similarly configuration Android SDK). To check the installation is correct, run in the terminal:
flutter --version
If the command displayed the version Flutter (for example, Flutter 3.19.5) - the next step is launch flutter doctor, which will check the system for the presence of all the necessary ones. components:
flutter doctor
The ideal output should look like this:
[โ] Flutter (Channel stable, 3.19.5, on Microsoft Windows [Version 10.0.22621.2283], locale ru-RU)[โ] Android toolchain - develop for Android devices
[โ] Chrome - develop for the web
[โ] Visual Studio - develop for Windows (optional)
[โ] Android Studio (version 2023.1)
[โ] VS Code (version 1.85)
[โ] Connected device (3 available)
[โ] Network resources
If flutter doctor shows missing warnings Android licensesrun the command flutter doctor --android-licenses and agree to the terms (click y for all packages).
4. Setting up Flutter and Dart plugins in Android Studio
To Android Studio recognize projects Flutter, you need to install two plugins:
- Flutter โthe main plugin for supporting the framework.
- Dart โ a plugin for the programming language in which Flutterapplications are written.
Open Android Studio, go to File โ Settings โ Plugins (or Android Studio โ Preferences โ Plugins to macOS) and find both plugins through the search. After installation, restart the IDE.
Now you can create your first project. Select New Flutter Project in the start window Android Studio and specify:
- ๐ Project type:
Application(for the mobile application). - ๐ค Project name: for example,
my_first_app. - ๐ Project location: folder without Cyrillic alphabet and spaces.
- ๐ฑ Platforms: check Android (optional - iOS and Web).
After generating the project Android Studio automatically pull up dependencies via pub get. If the process is stuck, check your Internet connection or configure proxy in the file pubspec.yaml.
What to do if Android Studio does not see the device?
If your smartphone or emulator is not in the list of devices (flutter devices), do:
1. Turn on USB debugging on the phone (Settings โ About phone โ Number assembly - tap 7 times, then return to Settings โ System โ For developers โ USB debugging).
2. Connect the phone via USB and select mode File transfer (MTP).
3. data-i="191">go to Android Studio go to Tools โ Device Manager and click Rescan Devices.
4. If you are using an emulator, make sure that in AVD Manager at least one virtual device has been created with Google Play Services.
5. First assembly and launch of the application. data-i="196">After creating the project, you can start building B
After creating the project, you can start building. IN Android Studio in the top panel, select the target device (real smartphone or emulator) and click the green button Run (or Shift + F10). If everything is configured correctly, after a few seconds you will see a standard welcome application Flutter with a logo and a click counter.
If the build completed with an error, check:
- ๐ Internet connection (Flutter downloads dependencies the first time assembly).
- ๐ฑ The presence of a connected device or a running emulator.
- ๐ File
pubspec.yamlโit should not contain syntax errors.
Typical errors and their solutions:
| Error | Cause | Solution |
|---|---|---|
No devices available |
No connected devices detected | Run the emulator or connect a phone with USB debugging enabled |
Pub get failed |
Problems connecting to pub.dev | Check the Internet or set up a proxy in flutter config --http-proxy |
Gradle build failed |
Incompatibility of versions Gradle or Android Gradle Plugin | Update versions in android/build.gradle (see documentation) |
Flutter plugin not installed |
Plugin Flutter not activated | Restart Android Studio or install the plugin manually |
If the build was successful, but the application does not launch on the emulator, try changing Graphics in the AVD settings from Hardware to Software - this solves the problem with the black screen on some configurations.
6. work: useful plugins and settings
To speed up development, we recommend installing additional plugins and setting Android Studio:
- ๐ Rainbow CSV - syntax highlighting in
CSV-files (useful for working with data). - ๐จ Material Theme UI โ design themes for ease of eyes.
- ๐ CodeGlance โ mini code map (as in VS Code).
- ๐ฆ Pubspec Assist โ simplifies editing
pubspec.yaml.
Also configure hot reload โa function that allows you to instantly apply changes to the code without a complete rebuild. To do this:
- Launch the application on the device.
- Make changes to the code (for example, change the text in the
Textwidget). - Click
Ctrl + S(save) or buttonHot Reload(โก icon in the top panel).
If Hot Reload does not work, check that there are no syntax errors in the code and that the device is connected in debug mode. Sometimes restarting helps. data-i="246">command Windows sometimes restarting helps adb server team adb kill-server && adb start-server.
To speed up the build, disable unnecessary plugins in File โ Settings โ Plugins and increase the memory allocated for Android Studio:
- Close the IDE.
- Open the file
studio64.exe.vmoptionsin folderbin(Android Studio). - Increase the values
-Xmsand-Xmxto2048m(if you have16 GBRAM).
7. Solving common problems
Even if you follow the instructions exactly, errors may occur. Let's look at the most common ones:
7.1. Error: "Flutter command not found"
Cause: path to flutter\bin was not added to PATH or was added incorrectly.
Solution:
- Check the path to Flutter SDK command
where flutter(on Windows) orwhich flutter(on macOS/Linux). - If the path is not found, add it manually to the environment variables.
- Restart the terminal or computer.
7.2. Error: "Android licenses not accepted"
Cause: license agreements were not accepted Android SDK.
Solution: run flutter doctor --android-licenses and confirm all licenses by clicking y.
7.3. Error: "Gradle sync failed"
Cause: version incompatibility Gradle or Android Gradle Plugin.
Solution:
- Open
android/build.gradleand update the versions:
dependencies {classpath 'com.android.tools.build:gradle:8.1.0' // Latest stable version
}
android/gradle/wrapper/gradle-wrapper.properties:distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
โ ๏ธ Attention: If you are using macOS with a chip Apple Silicon (M1/M2), install Rosetta 2 for compatibility with some tools Android SDK. In the terminal, run: softwareupdate --install-rosetta.
8. Further steps: what to do after installation
Now that Flutter has been successfully installed and configured, you can begin to study the framework. We recommend:
- ๐ Go through the official tutorial "Write Your First Flutter App".
- ๐ ๏ธ Try to create a simple project using
ListView,NavigationiState Management(for example, Provider). - ๐ฑ Connect a physical device and test performance (the emulator does not always accurately reflect the behavior on a real device).
- ๐ Explore pub.dev โa repository of packages for Flutter, where you can find ready-made solutions for authentication, working with APIs, animations and much more.
If you plan to publish applications in Google Play, prepare in advance:
- ๐ Signature key (
keystore) for APK/AAB signing. - ๐ Description and screenshots of the application (requirements Google Play Console constantly updated).
- ๐ฐ Developer account (
$25one-time).
To debug performance, use the built-in tools Android Studio:
- Flutter Inspector โ analysis of widgets and their properties.
- Performance Overlay โ display of FPS and CPU/GPU load.
- DevTools โ advanced tools for profiling (available at
http://localhost:8181after launchflutter run).
To speed up development, use snippets in Android Studio. For example, enter stless and click Tab - generated template StatelessWidget. Full list of snippets: stful (StatefulWidget), stanim (animation), bloc (for BLoC pattern).
FAQ: Frequently asked questions about installing Flutter
Is it possible to install Flutter without Android Studio?
Yes, Flutter can be used with other code editors, for example VS Code (with plugin FlutterHowever, Android Studio provides deeper integration with tools. Android SDK, which simplifies debugging and building under Android.
How to update Flutter to the latest version?
Run the command flutter upgrade in the terminal. It will update Flutter SDK and all dependencies in the project. After updating, check the compatibility of the packages. in pubspec.yaml command flutter pub outdated.
Why does the emulator work very slowly?
The reasons may be different:
- Insufficient RAM (allocate to the emulator at least
2 GB). - Software graphics acceleration is enabled (change in AVD settings to
Hardware - GLES 2.0). - There is no support for virtualization in BIOS (check the settings
VT-x/AMD-V).
An alternative is to use a physical device or cloud emulators (Firebase Test Lab).
How to transfer a Flutter project to another computer?
Copy the folder with the project and run on the new PC:
flutter pub getโto install dependencies.- Configure Android SDK and paths in Android Studio (if they differ).
- Check the version Flutter with the command
flutter --versionand update it if necessary.
If you use git, just clone the repository and run flutter pub get.
Is it possible to develop for iOS on Windows?
Officially Flutter supports assembly for iOS only on macOS, since it requires Xcode i CocoaPods. However, there are workarounds: Use cloud services (Install on a virtual machine (for example, via data-i="366">via
- Use cloud services (MacStadium, GitHub Actions).
- Install macOS to a virtual machine (for example, via VMware or UTM).
- Build the project remotely Mac through
flutter build ios --releasevia SSH.
To test the interface, you can use iOS Simulator on macOS or the web version of the application.