Setup Android apps develop environment on macOS
System requirements
Hardware requirements
Software requirements
TIP
You do not need to install Dart SDK separately as the Flutter SDK includes the full Dart SDK.
Operating system
- macOS 10.15 (Catalina) or later.
Development tools
Download and install the following packages:
Git 2.27 or later to manage source code.
Android Studio 2023.2.1 (Iguana) or later to debug and compile Java or Kotlin code for Android. Flutter requires the full version of Android Studio.
Configure a text editor or IDE
You can build apps with Flutter using any text editor or integrated development environment (IDE) combined with Flutter's command-line tools.
Using an IDE with a Flutter extension or plugin provides code completion, syntax highlighting, and other features.
Popular options include:
- Visual Studio Code 1.77 or later with the Flutter extension for VS Code.
- Android Studio 2023.2.1 (Iguana) or later with the Flutter plugin for IntelliJ.
- IntelliJ IDEA 2023.2 or later with the Flutter plugin for IntelliJ.
RECOMMENDED
The Flutter team recommends installing Visual Studio Code and the Flutter extension for VS Code. This combination simplifies installing the Flutter SDK.
Install the Flutter SDK
In this guide, we will setup Flutter SDK at . You can change where you want to put it.
Warning
Don't install Flutter to a directory or path that meets the following conditions:
- The path contains special characters or spaces.
As an example, fails the condition.
Add Flutter to your PATH
The guide will show you two commonly used shells: and . If you are using other shell, please search for their guide of setting PATH.
Configure Android development
Install Android Studio first.
Then verify the following Android components have been installed:
- Android SDK Platform, API 34.0.5 (Android 14.0 "UpsideDownCake") or later
- Android SDK Command-line Tools
- Android SDK Build-Tools
- Android SDK Platform-Tools
- Android Emulator
Launch Android Studio.
Open SDK Manager.
Click SDK Platforms.
Verify that at least one of Android API 34.0.5 (Android 14.0 "UpsideDownCake") has been selected.▼ Check Android SDK installation
If all the Status column displays Update available or Not installed:
Select Android API 34.0.5 (Android 14.0 "UpsideDownCake") or later.
Click Apply.
When the Confirm Change dialog displays, click OK.
The SDK Quickfix Installation dialog displays with a completion meter.
When the install finishes, click Finish.
After you installed the latest SDK, the Status column might display Update available. This means some additional system images might not be installed. You can ignore this and continue.
Click SDK Tools.
Verify that the following SDK Tools have been selected:- Android SDK Command-line Tools
- Android SDK Build-Tools
- Android SDK Platform-Tools
- Android Emulator
▼ Check SDK Tools installation
If any of the preceding tools' Status column displays Update available or Not installed:
Select the needed tools.
Click Apply.
When the Confirm Change dialog displays, click OK.
The SDK Quickfix Installation dialog displays with a completion meter.
When the install finishes, click Finish.
Setup finished.
Configure your target Android device
WARNING
For the Hackathon participants, Please setup a simulator for demo.
Check your development setup
Run Flutter doctor
The flutter doctor
command validates that all components of a complete Flutter development environment for macOS.
Open your Terminal.
run the following command:
bashflutter doctor
As you chose to develop for Android, you do not need all components. If you followed this guide, the result of your command should resemble:
Running flutter doctor... Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.24.0, on macOS ...) [✓] Android toolchain - develop for Android devices (Android SDK version ...) [!] Chrome - develop for the web [!] Xcode - develop for iOS and macOS (Xcode not installed) [✓] Android Studio (version ...) [✓] VS Code (version ...) [✓] Connected device (1 available) [✓] Network resources ! Doctor found issues in ... categories.
Highlights are required:
- : build Flutter.
- : build Android app.
- : at least one simulator to demo.
- : project's components and plugin requires network connection to download or update.
Troubleshoot Flutter doctor issues
When the command returns an error, it could be for Flutter, VS Code, Android Studio, the connected device, or network resources.
If the command returns an error, you can run with again to gain more information:
flutter doctor -v
Check the output for other software you might need to install or further tasks to perform.
If you change the configuration of your Flutter SDK or its related components, run flutter doctor
again to verify the installation.
Start developing Android on macOS apps with Flutter
Congratulations. Having installed all prerequisites and the Flutter SDK, you can start developing Flutter apps for Android on macOS.