Skip to main content

You need to correctly set up your Flutter path.

From macOS install - Update your path:

  1. Determine the directory where you placed the Flutter SDK. You will need this in Step 3.

  2. Open (or create) $HOME/.bash_profile. You can do that by using terminal text editor by going in terminal and typing nano ~/.bash_profile

    macOS v10.15 (Catalina) uses the Z shell by default, so edit $file HOME/.zshrc.

    If you are using a different shell, the file path and filename will be different on your machine.

  3. Add the following line and change [PATH_TO_FLUTTER_GIT_DIRECTORY] to be the path where you cloned Flutter’s Git repository is:

     export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
    

    For example:

     export PATH=~/Documents/flutter/bin:$PATH
    
  4. Press Ctrl + X and when it asks you to save the file, choose Yes

  5. Run source $HOME/.bash_profile to refresh the current window or restart the terminal

  6. Verify that the flutter/bin directory is now in your PATH by running:

     echo $PATH
    

    Notice that [PATH_TO_FLUTTER_GIT_DIRECTORY] is where you installed Flutter SDK, not the location of your app

Instead of nano, you can use any text editor to edit file ~/.bash_profile.

For zsh:

  1. Open Terminal
  2. Run: nano ~/.zshrc
  3. Add: export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
  4. Run: source ~/.zshrc
  5. restart terminal
  6. Run: flutter doctor -v

For example : if flutter in your machine has been installed under [your_username]/Developer/flutter

export PATH=Developer/flutter/bin:$PATH

You need to correctly set up your Flutter path.

From macOS install - Update your path:

  1. Determine the directory where you placed the Flutter SDK. You will need this in Step 3.

  2. Open (or create) $HOME/.bash_profile. You can do that by using terminal text editor by going in terminal and typing nano ~/.bash_profile

    macOS v10.15 (Catalina) uses the Z shell by default, so edit $file HOME/.zshrc.

    If you are using a different shell, the file path and filename will be different on your machine.

  3. Add the following line and change [PATH_TO_FLUTTER_GIT_DIRECTORY] to be the path where you cloned Flutter’s Git repository is:

     export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
    

    For example:

     export PATH=~/Documents/flutter/bin:$PATH
    
  4. Press Ctrl + X and when it asks you to save the file, choose Yes

  5. Run source $HOME/.bash_profile to refresh the current window or restart the terminal

  6. Verify that the flutter/bin directory is now in your PATH by running:

     echo $PATH
    

    Notice that [PATH_TO_FLUTTER_GIT_DIRECTORY] is where you installed Flutter SDK, not the location of your app

Instead of nano, you can use any text editor to edit file ~/.bash_profile.

You need to correctly set up your Flutter path.

From macOS install - Update your path:

  1. Determine the directory where you placed the Flutter SDK. You will need this in Step 3.

  2. Open (or create) $HOME/.bash_profile. You can do that by using terminal text editor by going in terminal and typing nano ~/.bash_profile

    macOS v10.15 (Catalina) uses the Z shell by default, so edit $file HOME/.zshrc.

    If you are using a different shell, the file path and filename will be different on your machine.

  3. Add the following line and change [PATH_TO_FLUTTER_GIT_DIRECTORY] to be the path where you cloned Flutter’s Git repository is:

     export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
    

    For example:

     export PATH=~/Documents/flutter/bin:$PATH
    
  4. Press Ctrl + X and when it asks you to save the file, choose Yes

  5. Run source $HOME/.bash_profile to refresh the current window or restart the terminal

  6. Verify that the flutter/bin directory is now in your PATH by running:

     echo $PATH
    

    Notice that [PATH_TO_FLUTTER_GIT_DIRECTORY] is where you installed Flutter SDK, not the location of your app

Instead of nano, you can use any text editor to edit file ~/.bash_profile.

For zsh:

  1. Open Terminal
  2. Run: nano ~/.zshrc
  3. Add: export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
  4. Run: source ~/.zshrc
  5. restart terminal
  6. Run: flutter doctor -v

For example : if flutter in your machine has been installed under [your_username]/Developer/flutter

export PATH=Developer/flutter/bin:$PATH
Post Made Community Wiki by Machavity
Active reading [<en.wikipedia.org/wiki/Flutter_(software)> <en.wikipedia.org/wiki/MacOS_Catalina> <en.wikipedia.org/wiki/Git>]. Dressed the naked link. Applied some formatting (as a result, the diff looks more extensive than it really is - use view "Side-by-side markdown" to compare).
Source Link
Peter Mortensen
  • 31.6k
  • 22
  • 109
  • 133

You need to correctly set up your flutterFlutter path.

from here https://flutter.dev/docs/get-started/install/macos#update-your-pathFrom macOS install - Update your path:

  1. Determine the directory where you placed the Flutter SDK. You will need this in Step 3.

    Determine the directory where you placed the Flutter SDK. You will need this in Step 3.

  2. Open (or create) $HOME/.bash_profile. You can do that by using terminal text editor by going in terminal and typing nano ~/.bash_profile

    Open (or create) $HOME/.bash_profile. You can do that by using terminal text editor by going in terminal and typing nano ~/.bash_profile

    macOS v10.15 (Catalina) uses the Z shell by default, so edit $file HOME/.zshrc.

    If you are using a different shell, the file path and filename will be different on your machine.

  3. Add the following line and change [PATH_TO_FLUTTER_GIT_DIRECTORY] to be the path where you cloned Flutter’s Git repository is:

     export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
    

    For example:

     export PATH=~/Documents/flutter/bin:$PATH
    
  4. Press Ctrl + X and when it asks you to save the file, choose Yes

  5. Run source $HOME/.bash_profile to refresh the current window or restart the terminal

  6. Verify that the flutter/bin directory is now in your PATH by running:

     echo $PATH
    

    Notice that [PATH_TO_FLUTTER_GIT_DIRECTORY] is where you installed Flutter SDK, not the location of your app

macOS Catalina uses the Z shell by default, so edit $HOME/.zshrc.

If you are using a different shell, the file path and filename will be different on your machine.

  1. Add the following line and change [PATH_TO_FLUTTER_GIT_DIRECTORY] to be the path where you cloned Flutter’s git repo:

export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH

for example:

export PATH=~/Documents/flutter/bin:$PATH

  1. press CTRL X and when it asked you to save the file, choose yes

  2. Run source $HOME/.bash_profile to refresh the current window or restart the terminal

  3. Verify that the flutter/bin directory is now in your PATH by running: echo $PATH

Notice that [PATH_TO_FLUTTER_GIT_DIRECTORY] is where you installed flutter SDK, not the location of your app

Instead of nanonano, you can use any text editor to edit file ~/.bash_profile.

You need to correctly set up your flutter path.

from here https://flutter.dev/docs/get-started/install/macos#update-your-path

  1. Determine the directory where you placed the Flutter SDK. You will need this in Step 3.
  2. Open (or create) $HOME/.bash_profile. You can do that by using terminal text editor by going in terminal and typing nano ~/.bash_profile

macOS Catalina uses the Z shell by default, so edit $HOME/.zshrc.

If you are using a different shell, the file path and filename will be different on your machine.

  1. Add the following line and change [PATH_TO_FLUTTER_GIT_DIRECTORY] to be the path where you cloned Flutter’s git repo:

export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH

for example:

export PATH=~/Documents/flutter/bin:$PATH

  1. press CTRL X and when it asked you to save the file, choose yes

  2. Run source $HOME/.bash_profile to refresh the current window or restart the terminal

  3. Verify that the flutter/bin directory is now in your PATH by running: echo $PATH

Notice that [PATH_TO_FLUTTER_GIT_DIRECTORY] is where you installed flutter SDK, not the location of your app

Instead of nano, you can use any text editor to edit ~/.bash_profile

You need to correctly set up your Flutter path.

From macOS install - Update your path:

  1. Determine the directory where you placed the Flutter SDK. You will need this in Step 3.

  2. Open (or create) $HOME/.bash_profile. You can do that by using terminal text editor by going in terminal and typing nano ~/.bash_profile

    macOS v10.15 (Catalina) uses the Z shell by default, so edit $file HOME/.zshrc.

    If you are using a different shell, the file path and filename will be different on your machine.

  3. Add the following line and change [PATH_TO_FLUTTER_GIT_DIRECTORY] to be the path where you cloned Flutter’s Git repository is:

     export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
    

    For example:

     export PATH=~/Documents/flutter/bin:$PATH
    
  4. Press Ctrl + X and when it asks you to save the file, choose Yes

  5. Run source $HOME/.bash_profile to refresh the current window or restart the terminal

  6. Verify that the flutter/bin directory is now in your PATH by running:

     echo $PATH
    

    Notice that [PATH_TO_FLUTTER_GIT_DIRECTORY] is where you installed Flutter SDK, not the location of your app

Instead of nano, you can use any text editor to edit file ~/.bash_profile.

Updated the answer for Z Shell as introduced in MacOS Catalina
Source Link

You need to correctly set up your flutter path.

from here https://flutter.io/setup-macos/#update-your-pathhttps://flutter.dev/docs/get-started/install/macos#update-your-path

  1. Determine the directory where you placed the Flutter SDK. You will need this in Step 3.

  2. Open (or create) $HOME/.bash_profile. You can do that by using terminal text editor by going in terminal and typing nano ~/.bash_profile

    Determine the directory where you placed the Flutter SDK. You will need this in Step 3.
  3. Add the following line and change [PATH_TO_FLUTTER_GIT_DIRECTORY] to be the path where you cloned Flutter’s git repo:

    Open (or create) $HOME/.bash_profile. You can do that by using terminal text editor by going in terminal and typing nano ~/.bash_profile

macOS Catalina uses the Z shell by default, so edit $HOME/.zshrc.

If you are using a different shell, the file path and filename will be different on your machine.

  1. Add the following line and change [PATH_TO_FLUTTER_GIT_DIRECTORY] to be the path where you cloned Flutter’s git repo:

export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH

for example:

export PATH=~/Documents/flutter/bin:$PATH

  1. press CTRL X and when it asked you to save the file, choose yes

  2. Run source $HOME/.bash_profile to refresh the current window or restart the terminal

  3. Verify that the flutter/bin directory is now in your PATH by running: echo $PATH

Notice that [PATH_TO_FLUTTER_GIT_DIRECTORY] is where you installed flutter sdkSDK, not the location of your app

Instead of nano, you can use any text editor to edit ~/.bash_profile

You need to correctly set up your flutter path.

from here https://flutter.io/setup-macos/#update-your-path

  1. Determine the directory where you placed the Flutter SDK. You will need this in Step 3.

  2. Open (or create) $HOME/.bash_profile. You can do that by using terminal text editor by going in terminal and typing nano ~/.bash_profile

  3. Add the following line and change [PATH_TO_FLUTTER_GIT_DIRECTORY] to be the path where you cloned Flutter’s git repo:

export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH

for example:

export PATH=~/Documents/flutter/bin:$PATH

  1. press CTRL X and when it asked you to save the file, choose yes

  2. Run source $HOME/.bash_profile to refresh the current window or restart the terminal

  3. Verify that the flutter/bin directory is now in your PATH by running: echo $PATH

Notice that [PATH_TO_FLUTTER_GIT_DIRECTORY] is where you installed flutter sdk, not the location of your app

Instead of nano, you can use any text editor to edit ~/.bash_profile

You need to correctly set up your flutter path.

from here https://flutter.dev/docs/get-started/install/macos#update-your-path

  1. Determine the directory where you placed the Flutter SDK. You will need this in Step 3.
  2. Open (or create) $HOME/.bash_profile. You can do that by using terminal text editor by going in terminal and typing nano ~/.bash_profile

macOS Catalina uses the Z shell by default, so edit $HOME/.zshrc.

If you are using a different shell, the file path and filename will be different on your machine.

  1. Add the following line and change [PATH_TO_FLUTTER_GIT_DIRECTORY] to be the path where you cloned Flutter’s git repo:

export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH

for example:

export PATH=~/Documents/flutter/bin:$PATH

  1. press CTRL X and when it asked you to save the file, choose yes

  2. Run source $HOME/.bash_profile to refresh the current window or restart the terminal

  3. Verify that the flutter/bin directory is now in your PATH by running: echo $PATH

Notice that [PATH_TO_FLUTTER_GIT_DIRECTORY] is where you installed flutter SDK, not the location of your app

Instead of nano, you can use any text editor to edit ~/.bash_profile

deleted 8 characters in body
Source Link
Tree
  • 31.3k
  • 27
  • 82
  • 100
Loading
Source Link
Tree
  • 31.3k
  • 27
  • 82
  • 100
Loading