How to Install Flutter on Windows for Mobile Development: A Complete Setup Guide
To install Flutter on Windows, clone the Flutter repository to your local machine, add the flutter/bin directory to your system PATH, run flutter doctor to verify dependencies and download the Dart SDK, and install the Android SDK via Android Studio.
Setting up Flutter on Windows requires configuring several dependencies before you can build Android applications. This guide walks through the essential installation steps derived from the official flutter/flutter source code, ensuring your development environment matches the toolchain requirements defined in the repository's infrastructure documentation.
Prerequisites: Install Git for Windows
Windows does not ship with Git, which Flutter requires to fetch its source code. According to docs/infra/Flutter-Installation-Bundles.md, you must install the command-line version of Git before proceeding, as the Flutter SDK relies on Git commands to manage its internal tools and updates.
Clone the Flutter Repository
The recommended installation method retrieves the latest Flutter SDK source directly from GitHub. This approach ensures you have access to the most recent stable features and fixes while maintaining the ability to switch between versions.
git clone -b master https://github.com/flutter/flutter.git
cd flutter
Configure the System PATH
The flutter command must be accessible from any terminal window to function correctly. As specified in docs/infra/Flutter-Installation-Bundles.md lines 11-13, you need to add the flutter/bin directory to your PATH environment variable.
For Command Prompt:
set PATH="%PATH%;%CD%\flutter\bin"
For PowerShell:
$env:Path += ";$PWD\bin"
Verify Installation with flutter doctor
The flutter doctor command performs automatic initialization by downloading the Dart SDK, building the initial snapshot, and validating your complete installation. This tool cross-references your system against the Windows workflow defined in packages/flutter_tools/lib/src/windows/windows_workflow.dart to report missing dependencies required for mobile development.
flutter doctor
Install the Android SDK
Flutter requires the Android SDK to compile and run mobile applications. If flutter doctor reports the Android SDK as missing, download Android Studio (recommended) and use its SDK Manager to install the necessary platforms and build tools.
After installing Android Studio, accept the required licenses:
flutter doctor --android-licenses
Optional Configurations
Visual Studio Build Tools for Windows Desktop
While not required for Android mobile development, compiling Windows desktop targets requires Visual Studio 2022 with the Desktop development with C++ workload. This installation includes the Windows 10 SDK as noted in docs/engine/contributing/Setting-up-the-Engine-development-environment.md lines 24-27.
IDE Plugins for Enhanced Productivity
Install the Flutter and Dart plugins for VS Code or Android Studio to enable syntax highlighting, hot-reload buttons, and integrated debugging support. While optional for CLI workflows, these tools significantly improve the development experience by interfacing with the Flutter daemon.
Pre-cache Android Artifacts
To eliminate download delays during your first build, download all Android-specific toolchains ahead of time:
flutter precache --android
This command is particularly useful when preparing for offline development environments.
Create and Run Your First App
Verify the complete toolchain by creating a sample project and running it on an attached Android device or emulator:
flutter create my_app
cd my_app
flutter run
Summary
- Install Git for Windows before cloning, as the Flutter SDK requires Git to fetch dependencies and manage the Dart SDK.
- Clone the repository using
git clone -b master https://github.com/flutter/flutter.gitto retrieve the latest source. - Update your PATH to include
flutter/binso thefluttercommand is available globally. - Run
flutter doctorto automatically download the Dart SDK and identify missing Android dependencies. - Install Android Studio and accept licenses via
flutter doctor --android-licensesto enable Android builds. - Optional: Install Visual Studio 2022 with C++ workload only if targeting Windows desktop.
- Optional: Run
flutter precache --androidto download build artifacts for offline development.
Frequently Asked Questions
Do I need Visual Studio to develop Android apps with Flutter on Windows?
No. Visual Studio 2022 with the Desktop development with C++ workload is only required for building Windows desktop applications. For Android mobile development, you only need the Android SDK and Android Studio as verified by the Windows workflow in packages/flutter_tools/lib/src/windows/windows_workflow.dart.
Why does flutter doctor report that Git is not installed even after I installed it?
This typically occurs when Git is installed without adding it to the system PATH during installation. Re-run the Git installer and ensure you select the option "Git from the command line and also from 3rd-party software" to make Git available to Flutter's tooling, as required by docs/infra/Flutter-Installation-Bundles.md.
Can I use Flutter on Windows without Android Studio?
Yes, but Android Studio provides the easiest path to installing the Android SDK and emulator. You can use the standalone Android SDK Command Line Tools, but you must manually configure the ANDROID_SDK_ROOT environment variable and accept licenses via flutter doctor --android-licenses before building apps.
What is the flutter precache command and when should I use it?
flutter precache --android downloads all Android-specific build artifacts (including Gradle wrappers and engine binaries) in advance. Use this command when you need to work offline or want to eliminate download delays during your first flutter run or flutter build execution.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →