7

Do you have any idea how to fix this? The Windows Power Shell returns the following when I type in "flutter doctor":

`The term 'flutter' is not recognized as the name of a cmdlet, function, script file, or operable program.

Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + flutter doctor + ~~~~~~~ + CategoryInfo : ObjectNotFound: (flutter:String) [],

CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException`

Lekr0
  • 653
  • 1
  • 8
  • 17
user3154841
  • 71
  • 1
  • 1
  • 3
  • This is a frequently asked question. The current directory isn't normally in the path in powershell. You could use .\flutter to run it. – js2010 Mar 01 '20 at 18:15
  • If environment variable is setup properly (https://docs.flutter.dev/get-started/install/windows) , restarting your system will solve the issue :) – Piumi ganegoda Jun 17 '22 at 19:28

4 Answers4

4

Have you added the path to the flutter command to your path and logged out / restarted? You should have the following entries:

FLUTTER_ROOT: <wherever you downloaded flutter> PATH: <path> + %FLUTTER_ROOT%\bin

Luke
  • 6,388
  • 3
  • 26
  • 35
  • Thank you for your help. I added C:\flutter\bin to Path and restarted. I added it to existing Path value after a ; per the instructions on flutter.io I will try creating a new Path Environment Variable: Path c:\flutter\bin to see if that works. – user3154841 Mar 19 '18 at 19:53
  • 2
    OK. Adding a new Environment Variable works. Appending it after a ; at the end of the existing Path doesn't work. Thank you for your help! Maybe the documentation at flutter.io should be changed? "Update your path...." from https://flutter.io/setup-windows/ – user3154841 Mar 19 '18 at 20:12
  • I faced the same issue. I just restarted the system & it's working. Thanks. – Kushal Desai Jun 28 '20 at 11:07
3

Add flutter/bin folder to the environment variables:

  1. On windows 10 click start, type environment variables, then click Edit System Environment variables

  2. Click Environment Variables

  3. Under User Variables, select path and click edit button

  4. Click New and browse the path to your flutter/bin folder

  5. Click OK

  6. Restart your Power Shell and run flutter commands again

DK250
  • 1,064
  • 13
  • 11
2

Follow below steps and restart your system once it worked for me

  1. Search -> ‘env’ and select Edit environment variables for your account.

  2. Under User variables check if there is an entry called Path: If the entry exists, append the full path to flutter\bin using ; as a separator from existing values. If the entry doesn’t exist, create a new user variable named Path with the full path to flutter\bin as its value

  3. Restart System

  4. After that run this command : C:\src\flutter flutter doctor
Rocky
  • 515
  • 1
  • 7
  • 18
1

The easiest possible way if you are using windows 10 is to go to

my computer

right click and choose

properties

after that from the left side you choose

Advanced System settings from there you choose the advanced tab you'll find at the bottom Environment Variables Click on it and find PATH If it doesn't exist create one if it does click on it and edit and keep the original path and add to it ; then the full directory of your flutter bin.

Shahin
  • 2,507
  • 1
  • 13
  • 17