FlutterBasic 2 min readTroubleshooting guide

Fix flutter command not found: PATH and SDK selection

Find the installed Flutter executable, repair PATH and verify your editor and terminal use the same SDK.

On this page

Symptom

The terminal reports that flutter is not recognized or the command cannot be found. This is a shell command-resolution problem before your application is compiled.

Diagnose the selected executable

Locate the SDK’s bin directory. On Windows, run where.exe flutter; on macOS or Linux, use which flutter. If no result appears, the directory may not be in PATH or the terminal may still have an old environment.

Fix the matching cause

Add the actual SDK bin directory to the user environment through your operating system’s settings. Do not copy a placeholder path without checking where the SDK is installed. Reopen terminals and the editor after updating the environment.

If several results appear, compare their order and remove an obsolete selection deliberately. A package manager or version manager may control the path, so inspect its configuration before manually editing managed files.

Do not reinstall the application first

Deleting your Flutter project cannot repair a missing shell command. Keep SDK installation and project source separate, and avoid modifying dependency caches as a substitute for fixing PATH.

Worked example

These commands run from a local project terminal.

flutter --version
flutter doctor -v

Read the result

Apply only the change that matches the observed cause. Keep the original diagnostic output so you can compare the same command after the change.

Verify the shell before investigating the application

If command resolution fails, Dart code has not been compiled yet. Reopen a terminal after changing PATH and inspect the executable it finds. Compare the editor’s SDK setting only after the terminal selection is known.

Do not replace the whole PATH or copy the flutter executable away from its SDK tree. Follow the OS-specific Windows or macOS/Linux steps, then run a clean first project as a separate verification stage.

Practice and verification

In a fresh terminal, verify the selected SDK path and run both commands successfully. Then compare the SDK configured by your editor. If only the editor fails, investigate its environment rather than repeatedly changing the global PATH.

How this topic connects

Understand first

Apply it next

Find your next idea

Search lessons, code examples and projects.

Type a few words to start exploring.