While installing flutter using the official documentation, I am getting the following outputs through VS code when I was installing flutter SDK.
What do they mean and how do I correct them?
! The flutter binary is not on your path. Consider adding /Users/gauravkumar/Documents/development/flutter/bin to your path.
! The dart binary is not on your path. Consider adding /Users/gauravkumar/Documents/development/flutter/bin to your path.
And the last message is
! Doctor found issues in 3 categories.
2
Answers
To run Flutter commands in the Terminal, add Flutter to the
PATH
environment variable. Probably, in your case you added it to temporary path which just vanishes if you close the terminal. To add to actual path you need:nano ~/.zshrc
export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
control+x
and click yessource ~/.zshrc
flutter --version
Here,
PATH_TO_FLUTTER_GIT_DIRECTORY
is the directory to yourflutter
folder. I usually put mine inDocuments
folder.If problem still remains, include which steps you did and share your
.zshrc
file.The Flutter binary path is not added to your environment variable, so your system can not recognize flutter commands.
Go to flutter SDK folder, where it has been downloaded.
Navigate to bin folder within SDK and copy that path.
Write
env
in your windows search if you are win OS, system environment variables management screen will open.Press environment variables.
in user variables section, click on
Path
and click new then insert thebin path
of the flutter sdk.double
applay
s andok
, and you are done.