One PowerShell script that sets up a complete Flutter and Android build toolchain on
Windows 10/11 — Git for Windows, the latest stable Flutter SDK, Eclipse Temurin JDK 17 and
the Android SDK command-line tools — then sets ANDROID_HOME, JAVA_HOME and your user
PATH, accepts all Android SDK licenses, then runs flutter doctor so you can see exactly
where you stand.
No Android Studio, no VS Code, no Chocolatey/winget/Scoop, and no administrator rights.
Hours of manual Flutter and Android SDK setup, reduced to one double-click.
Windows is fully supported. macOS and Linux are TODO stubs — see Platform status and roadmap.
- Get the files. Click Code → Download ZIP, then right-click the ZIP →
Extract All. (Or
git clone https://github.com/saty-a/flutter-dev-setup.gitif you already have Git — the script installs it for you if you don't.) - Open the
windowsfolder and double-clickrun-setup.bat. - Wait. Most of the time is downloading and unzipping (the Flutter SDK alone is ~1 GB). The window stays open at the end and prints a summary table plus the log file path.
That's it. Nothing to install first, nothing to elevate, nothing to configure.
When it finishes: open a new terminal — PATH changes never reach already-open
windows — and run:
flutter doctorIf double-clicking is blocked by policy, or you want flags, see Running it from PowerShell.
Getting Flutter building Android apps on a fresh Windows machine is not one install. It is a
Flutter zip, a JDK, Android cmdline-tools, three sdkmanager packages, PATH plus
ANDROID_HOME and JAVA_HOME, and a license prompt — in the right order, in a path with no
spaces, without admin rights, and usually behind a corporate proxy. Miss any step and
flutter doctor hands you an error string instead of an explanation.
If you have seen any of these, this repo is for you:
'flutter' is not recognized as an internal or external commandcmdline-tools component is missingAndroid sdkmanager tool not foundUnable to locate Android SDK/Android SDK not found at this locationFailed to find 'ANDROID_HOME' environment variableAndroid license status unknown/Some Android licenses not acceptedJAVA_HOME is set to an invalid directory, or Flutter quietly not using the JDK fromJAVA_HOMEcmdline-tools: could not determine SDK rootFailed to download any source lists!/IO exception while downloading manifest
Every one of those is a thing this script sets up correctly, or repairs on a re-run. It is meant for a first Flutter machine, a lab or classroom of them, and for handing a new developer something they can run on day one without a walkthrough.
| Tool | Version | Install location |
|---|---|---|
| Git for Windows | latest (resolved at runtime) | %LOCALAPPDATA%\Programs\Git |
| Flutter SDK | latest stable (resolved at runtime) | C:\dev\flutter |
| Eclipse Temurin JDK | latest 17 GA (resolved at runtime) | C:\dev\java\jdk-17.x.y+z |
| Android cmdline-tools | pinned (see $Config in setup.ps1) |
C:\dev\Android\sdk\cmdline-tools\latest |
| Android SDK packages | platform-tools, platforms;android-36, build-tools;36.0.0 |
C:\dev\Android\sdk |
Versions are resolved at runtime from the publishers' own endpoints — Google's Flutter
releases JSON, the Adoptium API, the Git for Windows releases API — so you get current
stable builds rather than whatever was current when this repo was last touched. Pinned
fallback URLs in $Config are used only if that resolution fails.
Downloads are fetched from official sources only (Google, Adoptium, GitHub) and SHA-256 verified where the publisher provides checksums (Flutter, JDK, cmdline-tools).
No Android Studio and no VS Code — this is the pure command-line toolchain.
flutter doctor may still suggest Android Studio; that suggestion is safe to ignore
for command-line builds.
- Windows 10 or 11, 64-bit
- Windows PowerShell 5.1 — the one already built into Windows; PowerShell 7 is not needed
- ~15 GB free disk space on the install drive
- Internet access
- No administrator rights needed — everything installs per-user
Option A (easiest): double-click windows\run-setup.bat.
Option B (PowerShell):
powershell -NoProfile -ExecutionPolicy Bypass -File windows\setup.ps1Flags:
| Flag | Effect |
|---|---|
-VerifyOnly |
Check what's installed + run flutter doctor; change nothing |
-SkipAndroid |
Skip JDK + Android SDK (e.g. Android Studio already provides them) |
-InstallRoot D:\sdk |
Install somewhere else (path must not contain spaces) |
-Precache |
Also run flutter precache --android at the end |
run-setup.bat passes arguments straight through, so run-setup.bat -VerifyOnly works too.
When it finishes: open a new terminal (PATH changes don't affect already-open ones)
and run flutter doctor to confirm.
This doubles as the uninstall checklist. Everything is user-scope — nothing is
written to HKLM or C:\Program Files.
- Creates
C:\dev\containingflutter\,java\,Android\sdk\,.downloads\(installer cache),logs\- If
C:\devcannot be created (locked-down machines), the script warns and falls back to%USERPROFILE%\dev— substitute that path throughout this document
- If
- Installs Git to
%LOCALAPPDATA%\Programs\Git(registered in Apps & features) - Adds to the user
PATH:C:\dev\flutter\bin,C:\dev\java\<jdk>\bin,C:\dev\Android\sdk\platform-tools,C:\dev\Android\sdk\cmdline-tools\latest\bin, Git'scmdfolder - Sets user environment variables:
ANDROID_HOME,JAVA_HOME - Accepts Android SDK licenses (hash files in
C:\dev\Android\sdk\licenses\) - Writes persistent Flutter tool settings (
android-sdkandjdk-dirabsolute paths) into the user profile (%APPDATA%\flutter\settings) viaflutter config - Creates an empty
%USERPROFILE%\.android\repositories.cfg(silences an sdkmanager warning) - Writes a log per run to
C:\dev\logs\(setup-YYYYMMDD-HHMMSS.log, a full PowerShell transcript)
Two implementation details worth knowing if you audit scripts before running them:
the environment variables are written straight into HKCU\Environment rather than with
setx (which truncates values at 1024 characters and rewrites REG_EXPAND_SZ as
REG_SZ), and the script then broadcasts WM_SETTINGCHANGE so Explorer and newly launched
processes pick the changes up. On proxied networks it also sets JAVA_TOOL_OPTIONS for its
own child JVMs only — process-scoped, never persisted.
The script is idempotent: every step first checks whether it is already done and
skips cleanly, so re-running works as a repair/audit — the final summary table
shows each component as Installed / Already installed / MISSING.
To force a reinstall of one tool, delete its folder under C:\dev and re-run
(for Git, uninstall it via Apps & features instead — it lives in
%LOCALAPPDATA%\Programs\Git).
Exit codes: 0 success · 1 failure/components missing · 2 everything
installed but flutter doctor reports toolchain issues.
powershell -NoProfile -ExecutionPolicy Bypass -File windows\setup.ps1 -VerifyOnlyDo I need Android Studio for Flutter?
No. Android Studio is an IDE; what Flutter actually needs from it is the Android SDK, and
the SDK ships separately as cmdline-tools — which is what this script installs. You can
build, run and sign Android apps with only the command line. flutter doctor will still
list Android Studio as "not found"; for CLI builds that line is cosmetic.
Can I install the Android SDK without Android Studio on Windows?
Yes — that is exactly what the cmdline-tools + sdkmanager path is for, and it is what
this script automates (platform-tools, platforms;android-36, build-tools;36.0.0).
Do I need admin rights?
No. Everything lands under C:\dev and %LOCALAPPDATA%, and only user-scope environment
variables are written. This also avoids Flutter's documented "SDK is installed in a
protected folder and may not function correctly" failure mode.
Does it work with the PowerShell that ships with Windows? Yes — Windows PowerShell 5.1. You do not need PowerShell 7, Chocolatey, winget or Scoop, and the script installs no package manager of its own.
Will it break an existing Flutter or Android Studio installation?
It checks before it acts, so nothing is installed twice. If Android Studio already gives
you a JDK and SDK, run it with -SkipAndroid so it only handles Git and Flutter. Note that
it does write android-sdk/jdk-dir into %APPDATA%\flutter\settings, so an existing
Flutter install will be pointed at this script's SDK paths.
What about WSL2? Not needed and not what this targets. This is a native Windows toolchain; you can build and run Android apps from Windows directly, with no WSL2 involved.
Can I use it to set up several machines?
Yes — it is unattended, logs each run, and -VerifyOnly gives you an audit pass, so the
same file works for one laptop or a room of them. -InstallRoot moves everything if C:
is small or locked down.
Execution policy blocked — use run-setup.bat or the -ExecutionPolicy Bypass
one-liner above; neither changes the machine's policy.
Corporate proxy — set the proxy for the session before running:
$env:HTTPS_PROXY = 'http://proxy.example.com:8080'
sdkmanager: "Failed to download any source lists!" / "IO exception while
downloading manifest" — the Java tooling can't reach Google's package
repository even though the PowerShell downloads worked. Typical on corporate
networks: PowerShell uses the Windows proxy + Windows certificate store, but
the JVM uses neither. The script handles this automatically (it points the JVM
at the Windows certificate store and the system proxy via JAVA_TOOL_OPTIONS).
If it still fails, your proxy likely requires credentials — set
$env:HTTPS_PROXY = 'http://user:pass@proxy.example.com:8080' and re-run,
or run the script once on an unrestricted network (hotspot).
Antivirus makes extraction very slow — extracting the ~1 GB Flutter zip
(thousands of small files) can crawl under real-time scanning. Optionally add a
Defender exclusion for C:\dev (requires admin) or just wait it out.
Download failed / checksum mismatch — delete the matching file in
C:\dev\.downloads and re-run; partial downloads are never reused.
flutter doctor complaints —
- Android Studio not found: expected; safe to ignore for CLI builds.
- Visual Studio not installed: only needed for Windows desktop apps, not Android.
- Chrome not found: only needed for Flutter web development.
- licenses not accepted: re-run the script (it re-runs license acceptance) or run
flutter doctor --android-licensesmanually.
flutter/adb not recognized in a new terminal — terminals launched from an
IDE that was open during setup inherit the old environment; restart the IDE.
- Delete
C:\dev(or%USERPROFILE%\devif setup warned it fell back there) - Uninstall "Git" via Apps & features
- In Settings → Environment Variables → User variables: remove
ANDROID_HOME,JAVA_HOME, and the PATH entries listed above - Delete
%APPDATA%\flutter\settings— it stores the android-sdk/jdk-dir paths pointing intoC:\devand would misdirect any future Flutter installation - Optionally delete caches and script-created config:
%USERPROFILE%\.android(includes therepositories.cfgthe script created),%USERPROFILE%\.gradle,%LOCALAPPDATA%\Pub\Cache
| Platform | Status | Script |
|---|---|---|
| Windows 10/11 | Supported | windows/setup.ps1 + windows/run-setup.bat |
| macOS | Planned — stub only | macos/setup.sh |
| Linux | Planned — stub only | linux/setup.sh |
- Windows: Git, Flutter SDK, JDK 17, Android SDK, env vars, license acceptance,
flutter doctor - Idempotent re-runs plus a
-VerifyOnlyaudit mode - Corporate proxy / SSL-inspection handling for the JVM
- macOS —
macos/setup.shmirroring the Windows flag surface and exit codes - Linux —
linux/setup.sh, same contract - CI smoke test on
windows-latest(PSScriptAnalyzer +-VerifyOnly)
macos/setup.sh and linux/setup.sh currently print a pointer and exit 1.
Until they land, use the official manual guides:
macOS ·
Linux
- Want to do it by hand and understand every step? Flutter's own manual install and troubleshooting pages.
- Want the full Android Studio IDE? Install it, then run this with
-SkipAndroidto get just Git and Flutter. - Need several Flutter SDK versions side by side? Use FVM.
- Setting up a CI runner rather than a laptop? Use flutter-action.
Contributions are open and genuinely wanted — start with CONTRIBUTING.md.
The top wanted contribution is macos/setup.sh and linux/setup.sh. They are stubs
today, and windows/setup.ps1 is the reference implementation: the port should keep the
same flag surface (-VerifyOnly / -SkipAndroid / -InstallRoot / -Precache), the same
exit codes (0 / 1 / 2), be idempotent, install to user scope with no sudo, verify
SHA-256 where the publisher provides checksums, log each run, and end with the same
Installed / Already installed / MISSING summary. Partial work is welcome — a setup.sh
that only does the JDK step, with the rest as clean no-ops, is a useful pull request.
Other ways to help, no shell scripting required:
- Run it and tell me what happened. Open an issue with your Windows
edition and build (
winver),$PSVersionTable.PSVersion, the flags you used, and the log fromC:\dev\logs\. - Test it behind a corporate proxy or SSL inspection. That is the hardest path to verify alone and the one most likely to still be wrong.
- Hit a
flutter doctorcase Troubleshooting doesn't cover? Open an issue with the exact error text so it can be added.
If this repository helped you, please give it a star — that's how other people fighting the
same flutter doctor errors find it.
Installing Flutter on Windows without Android Studio still means reading three docs pages,
unzipping two SDKs, editing PATH, ANDROID_HOME and JAVA_HOME by hand, and then
guessing why flutter doctor says cmdline-tools component is missing. This repo turns
that into one readable, auditable PowerShell script you can re-run whenever a machine
drifts — for your own laptop, for a classroom of them, or for a developer's first day.
MIT. It downloads and runs third-party installers and changes your user
environment variables; read windows/setup.ps1 before you run it, and note that the
software comes with no warranty.
Flutter and the related logo are trademarks of Google LLC. Android is a trademark of Google LLC. This project is not endorsed by or affiliated with Google LLC.