Sometimes when the user runs a flutter doctor from a command prompt or from a PowerShell user will start getting an error that states that the flutter doctor doesn’t work. So in this article, we will learn about how to resolve the same.
How to Solve flutter doctor doesn’t work on either Command Prompt or PowerShell Window?
Follow the process accordingly to solve the issue you can also consult or hire Flutter developer for hassle free Flutter doctor solutions. To run flutter from the command prompt on your windows system it requires three things as below:
- path to the bin folder of downloaded flutter SDK I have downloaded and saved the SDK in my documents so for me path will be C:\Users\mahesh_2\Documents\flutter_windows_v0.11.9-beta\flutter\bin
- where.exe located at C:\Windows\System32
Note: you need to download git from here if you don’t find the path in step 3
- git-cmd.exe located in C:\Program Files\Git\git-cmd.exe
so to simply add these three paths to your environment variables go to system environment variables with variable name as Path and value as C:\Windows\System32;C:\Program Files\Git\git-cmd.exe;C:\Users\mahesh_2\Documents\flutter_windows_v0.11.9-beta\flutter\bin
Restart the command prompt and try running flutter and Voila! you should get something like below:
command prompt in Flutter
- You can also try the below solution. make sure that the environment variables are set correctly,
- Go to “Control Panel > User Accounts > User Accounts > Change my environment variables”
- Under “User variables” check if there is an entry called “Path”:If the entry does exist, append the full path to flutter\bin using ; as a separator from existing values.If the entry does not exist, create a new user variable named Path with the full path to flutter\bin as its value.
- Once both above steps are done, run flutter doctor
Running Flutter Doctor
There are two mistakes to be avoided:
- Add it to the System variables Path, not the user variables path.
- In the Windows, 10 Interface do not mistake the new variable for the solution to add your path to the Path-variable. In most cases, there should already be a variable named Path (otherwise create one) which contains all paths and you have to append your path to flutter/bin to this Path-variable.
Thanks for Reading. In this article, we have been through How to Solve flutter doctor doesn’t work on either Command Prompt or PowerShell Window? Learn more about the Flutter 3 and its new updates for developer.
Keep Learning !!! Keep Fluttering !!!
Still, need Support for Flutter Development? Do let us know.
FlutterAgency.com is our portal Platform dedicated to Flutter Technology and Flutter Developers. The portal is full of cool resources from Flutter like Flutter Widget Guide, Flutter Projects, Code libs and etc
Read also: avple