Flutter Lesson 2 of 83 2 min read
How to Install Flutter on Windows, macOS and Linux
Step-by-step guide to installing the Flutter SDK, running flutter doctor, and setting up VS Code or Android Studio and a device.
On this page
Setting up takes about half an hour, most of it waiting for downloads. Installers change, so treat this as the map and follow docs.flutter.dev/get-started for the exact current steps.
What you need #
| To build for | You need |
|---|---|
| Android | Windows, macOS or Linux, plus Android Studio for the Android SDK and emulator |
| iOS | A Mac with Xcode. iOS apps cannot be built on Windows or Linux |
| Web | Chrome |
| Desktop | Visual Studio on Windows, Xcode on macOS, a C++ toolchain on Linux |
Start with one target. Chrome needs no setup at all.
1. Install the SDK #
The Flutter SDK includes Dart.
Easiest: install VS Code, add the Flutter extension, open the command palette and run Flutter: New Project. The extension offers to download the SDK for you.
By hand: download the SDK from the official site, unpack it in a folder without spaces in its path (such as C:\dev\flutter or ~/development/flutter), and add its bin folder to your PATH.
macOS with Homebrew:
brew install --cask flutter
Check it:
flutter --version
2. Run flutter doctor #
flutter doctor
[✓] Flutter (Channel stable)
[✓] Android toolchain - develop for Android devices
[✗] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] VS Code
[✓] Connected device (2 available)
A cross only matters if you need that platform, and each one comes with instructions. For Android you usually need to accept the licences:
flutter doctor --android-licenses
3. Set up an editor #
| Editor | Setup |
|---|---|
| VS Code | Install the Flutter extension. It brings the Dart extension with it |
| Android Studio | Install the Flutter plugin from Settings, Plugins |
Both give you autocomplete, the widget inspector, debugging and hot reload on save.
4. Get a device #
- Android emulator: in Android Studio, open Device Manager, create a device and start it.
- iOS simulator (Mac only):
open -a Simulator. - A real phone: on Android, enable Developer Options and USB debugging. On iPhone, connect it and trust the computer.
- Chrome: nothing to do.
flutter devices
When something goes wrong #
- Run
flutter doctor -vand read the detail. - Close and reopen the terminal after changing
PATH. - Search for the exact error text. Someone has met it before.
Try it yourself #
Install Flutter and get flutter doctor to show no problems for at least one platform.