skip to Main Content

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


  1. 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:

    1. Open the terminal
    2. Type nano ~/.zshrc
    3. Type: export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
    4. Save, by first control+x and click yes
    5. Type: source ~/.zshrc
    6. Restart your terminal
    7. Check the flutter version by flutter --version

    Here, PATH_TO_FLUTTER_GIT_DIRECTORY is the directory to your flutter folder. I usually put mine in Documents folder.

    If problem still remains, include which steps you did and share your .zshrc file.

    Login or Signup to reply.
  2. 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 the bin path of the flutter sdk.

    • double applays and ok , and you are done.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search