flutter doctor fails in Command Prompt or PowerShell on Windows
'flutter' is not recognized as an internal or external command operable program or batch fileShort answer
On Windows the usual causes are that flutter\bin is not on PATH, the terminal was opened before PATH changed, the SDK sits in a protected folder such as Program Files, or PowerShell blocks the helper script. Fix PATH, move the SDK to a user-writable folder, and reopen the terminal.
Fix it fast
1Find out which cause you have
Ask Windows where it finds flutter. If nothing is printed, the SDK is not on PATH for this terminal.
where.exe flutter2Match what you see, then jump to its fix
- 1
'flutter' is not recognized as an internal or external commandflutter\bin is not on PATHFix - 2
The Flutter SDK is installed in a protected folder and may not function correctly.The SDK is in a protected folderFix - 3
Invoke-Expression : You cannot call a method on a null-valued expression (update_engine_version.ps1)PowerShell fails inside the engine version scriptFix - 4
Git was never installed on this machine (git --version is not recognized)Git for Windows is missingFix
- 1
What does the error look like?
'flutter' is not recognized as an internal or external command operable program or batch fileThe Flutter SDK is installed in a protected folder and may not function correctly.Invoke-Expression : You cannot call a method on a null-valued expression
Cause 1 of 4
flutter\bin is not on PATH
1Check
The SDK's bin folder has to be a Path entry in your user variables, and the terminal has to be opened after the change.
where.exe flutter
echo %PATH%2Fix
Open Advanced System Settings, then Environment Variables. In User variables edit Path (or create it) and add the SDK's bin folder, for example %USERPROFILE%\develop\flutter\bin. Move it to the top of the list. Close and reopen every terminal and IDE.
%USERPROFILE%\develop\flutter\bin3Verify
Both tools answer in a new terminal.
flutter --version
dart --versionConfirmed by docs.flutter.dev
Cause 2 of 4
The SDK is in a protected folder
1Check
Folders such as C:\Program Files need administrator rights to write to, and Flutter updates itself inside its own folder.
where.exe flutter2Fix
Move the SDK to a folder you can write to without administrator permission, such as C:\src\flutter, update the Path entry to match, and restart the terminal.
C:\src\flutter\bin3Verify
flutter doctor starts without the protected-folder warning.
flutter doctorConfirmed by docs.flutter.dev
Cause 3 of 4
PowerShell fails inside the engine version script
1Check
The Flutter troubleshooting page lists this for flutter doctor in PowerShell. Confirm that the SystemRoot variable is set; it is normally C:\Windows.
echo $env:SystemRoot2Fix
Run PowerShell as Administrator and try again. If it still fails, allow locally created scripts for your user.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser3Verify
Open a new PowerShell window and run the doctor.
flutter doctorConfirmed by docs.flutter.dev
Cause 4 of 4
Git for Windows is missing
1Check
The install guide asks for Git for Windows before the SDK is extracted.
git --version2Fix
Install the latest Git for Windows, reopen the terminal, and run the doctor again.
# download the installer from https://git-scm.com/downloads/win3Verify
git answers and the doctor shows a result for Flutter.
git --version
flutter doctorConfirmed by docs.flutter.dev
How do I stop it coming back?
- Extract the SDK once into a path without spaces and without administrator rights.
- Set PATH through the Environment Variables dialog, then reopen terminals and IDEs.
- Keep Git for Windows installed and current.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- TaxiDexMy own multi-tenant taxi dispatch SaaS: API, dispatcher portal, driver and passenger apps, and the servers underneath.
- Dispatch ProA real-time logistics platform: Flutter apps, Spring Boot services and a Kafka event pipeline on AWS.
- Qist BazaarA buy-now-pay-later marketplace built from a blank repo, now past 100K downloads on Google Play.
Related fixes
Mobile apps
The Terminal on a Mac does not know the flutter command
flutter --version fails but the SDK folder exists on disk
zsh only runs programs found in folders listed in PATH.
3 causes, each with a fixMobile apps
Running flutter prints 'Error: Unable to find git in your PATH'
Error: The Flutter directory is not a clone of the GitHub project.
The flutter launcher script runs git before anything else.
3 causes, each with a fixMobile apps
Google Play says the app does not support 16 KB memory pages
check_elf_alignment.sh reports UNALIGNED for a library under lib/arm64-v8a
Google Play requires apps that target Android 15 or higher and ship native .so libraries to run on devices with 16 KB memory pages; from 1 February 2027 it will block updates that do not.
5 causes, each with a fixMobile apps
Gradle cannot find com.google.firebase:firebase-analytics-ktx
Required by: project :app
Firebase moved the Kotlin extensions into the main modules and stopped releasing the -ktx modules in July 2025.
2 causes, each with a fixMobile apps
Gradle cannot create LibraryVariantBuilderImpl in a Flutter Android build
Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl
This error appears when the Android Gradle plugin (AGP) cannot run in the Gradle or IDE you use.
3 causes, each with a fixMobile apps
Flutter release build cannot open the keystore: HmacPBESHA256 not available
Algorithm HmacPBESHA256 not available
The keystore is a PKCS12 file protected by a newer algorithm than the Java that is reading it understands.
3 causes, each with a fix