Install Flutter & Set Up
Before you can build Flutter apps you need three things: the Flutter SDK (which includes Dart), an editor with Flutter support, and at least one device to run apps on, such as an Android emulator, a real phone or the Chrome browser. This lesson walks through the setup on Windows, the most common choice for students in India, and notes what changes on macOS and Linux.
Setting up takes some time and a few gigabytes of downloads, so use a good internet connection. You only do it once.
What you need
| Item | Why | Notes |
|---|---|---|
| Git for Windows | The Flutter SDK is downloaded and updated with Git | Free, from git-scm.com |
| VS Code or Android Studio | Editor with Flutter and Dart plugins | VS Code is lighter; Android Studio includes Android tools |
| Flutter SDK | The flutter and dart commands, framework and engine | Includes the Dart SDK |
| Android Studio + Android SDK | Needed to build Android apps and run the emulator | Even if you code in VS Code |
| A Mac with Xcode | Needed only to build iOS apps | iOS apps cannot be built on Windows or Linux |
The Android emulator needs a lot of memory and processor power. If your laptop is slow, use a real Android phone over USB instead; it puts far less load on the computer.
Step 1: install the SDK with VS Code (recommended)
The official guide recommends letting the VS Code Flutter extension download the SDK for you:
- Install Git for Windows and Visual Studio Code.
- In VS Code, open the Extensions view (
Ctrl+Shift+X), search for Flutter and click Install. The Dart extension is installed with it. - Open the Command Palette (
Ctrl+Shift+P), typeflutterand choose Flutter: New Project. - When VS Code asks where the Flutter SDK is, choose Download SDK and pick a folder, for example
C:\dev. Avoid folders that need administrator rights, such asC:\Program Files, and avoid paths with spaces. - When the download finishes, click Add SDK to PATH.
- Close and reopen VS Code and any terminals so they see the new
PATH.
PATH is the list of folders where your system looks for commands. After step 5, typing flutter in any terminal works.
You can also install by hand: download the stable SDK archive for your system from the Flutter website, extract it to a folder such as C:\dev\flutter, and add C:\dev\flutter\bin to your user PATH in Windows settings. On macOS and Linux the steps are the same idea, with the archive extracted under your home folder.
Step 2: set up Android tools
Install Android Studio from the Android developer website, open it once, and then:
- Open More Actions > SDK Manager (or Tools > SDK Manager inside a project).
- On the SDK Platforms tab, install a recent Android platform (the official guide currently asks for API level 36).
- On the SDK Tools tab, make sure these are installed: Android SDK Build-Tools, Android SDK Command-line Tools, Android Emulator, Android SDK Platform-Tools, CMake and NDK (Side by side).
- Accept the Android licences from a terminal:
flutter doctor --android-licensesType y for each licence. At the end you should see All SDK package licenses accepted.
Step 3: check everything with flutter doctor
flutter doctor checks your installation and tells you what is missing. Run it after every setup step:
flutter doctorDoctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.47.6, on Microsoft Windows [Version 10.0.26300.9711], locale en-IN)
[√] Windows Version (Windows 11 or higher, 26H2, 2009)
[√] Android toolchain - develop for Android devices (Android SDK version 36.1.0)
[√] Chrome - develop for the web
[X] Visual Studio - develop Windows apps
X Visual Studio not installed; this is necessary to develop Windows apps.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Connected device (3 available)
[√] Network resources
! Doctor found issues in 1 category.This is a real run on a Windows laptop. Read it line by line: a tick means ready, [X] or [!] means something is missing. Here only Visual Studio is missing, which is needed only to build Windows desktop apps. If you are building for Android, you can safely ignore it. Fix the lines for the platforms you actually target, then run flutter doctor again. flutter doctor -v shows full details, including install paths.
Step 4: a device to run on
You have three options:
- Android emulator: in Android Studio, open More Actions > Virtual Device Manager, click Create Virtual Device, choose a phone such as a Pixel, download a system image and finish. Turn on hardware acceleration (virtualisation in your BIOS/Windows settings) or the emulator will be very slow.
- A real Android phone: on the phone, open Settings, tap Build number seven times to unlock Developer options, then turn on USB debugging. Connect the phone with a USB cable and accept the "Allow USB debugging?" prompt.
- Chrome: web apps need no extra setup, which makes Chrome handy for quick experiments.
List what Flutter can see:
flutter emulators # emulators you have created
flutter emulators --launch <emulator_id>
flutter devices # running emulators, phones, Chrome, desktopStep 5: create and run your first app
From a terminal (or with Flutter: New Project in VS Code):
flutter create --org in.yourname first_app
cd first_app
flutter runflutter create generates a complete counter app. --org sets the reverse-domain prefix used for the Android package name and the iOS bundle identifier, so this app becomes in.yourname.first_app. Choose your org carefully: once an app is published, this ID cannot change. If several devices are connected, flutter run asks which one to use, or you can pass -d chrome or a device id.
The app opens with a light purple top bar titled "Flutter Demo Home Page", the text "You have pushed the button this many times:" with a large 0 below it, and a round + button at the bottom right. Each tap increases the number. Now open lib/main.dart, change Colors.deepPurple to Colors.teal, and save: hot reload repaints the app in teal and the counter keeps its value.
iOS and macOS notes
To build for iPhone, you need a Mac with Xcode installed from the App Store, and you follow the iOS setup page on docs.flutter.dev. You can write Flutter code on Windows and later build the iOS version on a Mac, or use a cloud build service. Linux users install the same Android tools; the Flutter website lists the extra Linux packages needed for Linux desktop apps.
Common mistakes
- Not restarting the terminal after changing
PATH, soflutteris "not recognized". - Installing the SDK in
C:\Program Files, where updates fail because of permissions. - Ignoring
flutter doctor. It tells you exactly which licence or tool is missing. - A very slow emulator because virtualisation is switched off. Enable it, or use a real phone.
Key points
- You need Git, an editor (VS Code or Android Studio), the Flutter SDK and a device.
- The VS Code Flutter extension can download the SDK and add it to
PATHfor you. - Android builds need Android Studio's SDK tools and accepted licences (
flutter doctor --android-licenses). flutter doctorreports what is ready and what is missing; fix only the platforms you target.flutter create --org ...makes a project andflutter runstarts it with hot reload.- iOS apps can only be built on a Mac with Xcode.
Exercise
Install Flutter and run flutter doctor. Write down which lines show a tick and which show a problem, and decide which problems matter for building Android apps. Then create an app called hello_india with your own org, run it on an emulator, a phone or Chrome, and change the seed colour in lib/main.dart to Colors.orange. Write the three terminal commands you used.
Show solution
flutter doctor
flutter create --org in.meera hello_india
cd hello_india
flutter run -d chromeFor Android work, the lines that must show a tick are Flutter, Android toolchain and Connected device; a missing Visual Studio only matters for Windows desktop apps. After changing Colors.deepPurple to Colors.orange and saving, hot reload repaints the app in orange without restarting it.
Quick Quiz
1. Which command checks your Flutter installation and lists missing tools?
flutter doctor reports the status of the SDK and each platform toolchain.
2. flutter doctor shows [X] Visual Studio. You only build Android apps. What should you do?
Only the toolchains for the platforms you target need to be complete.
3. What do you need to build an iOS app?
iOS builds require Apple's Xcode, which runs only on macOS.
4. What does --org in.yourname in flutter create set?
The org becomes part of the app's unique ID, such as in.yourname.first_app.
Learn Flutter & Dart with a mentor
Free lessons get you started. Our Mobile App Development training adds real projects and code reviews from working developers.
- Project-based learning
- Mentor code reviews
- Free counselling call
