How to Fix Flutter Command Not Found


It will check that all prerequisites are satisfied, Flutter is properly installed and configured, and your Android or iOS development environment is bug-free.The error message “Flutter command not found” appears whenever the terminal is unable to carry out a Flutter Command Not Found. Usually, this occurs when either Flutter is not installed, the installation is incomplete, or the PATH environment variable is not set.

These are some broad measures you can take to attempt to resolve the “Flutter command not found” error:

  1. Check if Flutter is installed:

    • Terminal: flutter —version. Flutter is installed if it returns a version. Install Flutter.
  2. Add Flutter to your PATH:

    • The command may not be added to the PATH environment variable if Flutter has been installed but is not yet recognized.
    • Add the following line to your .bashrc or .zshrc file (depending on your shell): export PATH="$PATH:[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin"
    • Replace [PATH_TO_FLUTTER_GIT_DIRECTORY] with the path to your Flutter installation directory.
  3. Restart your terminal:

    • After adding Flutter to your PATH, restart your terminal or run source ~/.bashrc (or source ~/.zshrc) to apply the changes.
  4. Verify your installation:

    • Run the command flutter doctor to verify your installation and check for any issues.

If none of these steps work, you may need to reinstall Flutter or seek further assistance.

To check if Flutter is installed on your system ans still show “Flutter command not found”, you can follow these steps:

  1. Open a terminal or command prompt on your system.
  2. Type the command flutter --version and press Enter.
  3. If Flutter is installed, you should see the version number of your Flutter installation printed in the terminal. For example:
Flutter 3.7.5 • channel stable •
Framework • revision c07f788888 (3 weeks ago) • 2023-02-22 17:52:33 -0600
Engine • revision 0f359063c4
Tools • Dart 2.19.2 • DevTools 2.20.1

If you see a message indicating that the Flutter Command Not Found, then Flutter is not installed on your system.

To add Flutter to your PATH environment variable, you can follow these steps:

  1. Find the directory where Flutter was installed. If you have Flutter installed in your home directory on Linux, the full path could be /home/your username/flutter.
  2. With the command cd, which stands for “change directory to,” you may get to your home directory once you open a terminal or command prompt.
  3. Launch the shell’s profile editor. The Bash shell’s.bashrc file can be opened with the Nano text editor by typing the command nano.bashrc, for instance.
  4. Add the following line at the end of your shell profile file, replacing /path/to/flutter with the actual path to your Flutter installation directory:
export PATH="$PATH:/path/to/flutter/bin"
  1. Exit the text editor and save your shell profile modifications.
  2. Reload your shell profile by running the command source ~/.bashrc (or source ~/.zshrc if you are using the Zsh shell).
  3. Verify that Flutter is in your PATH by running the command echo $PATH. You should see the path to your Flutter installation directory listed in the output.

To verify your Flutter installation, you can use the flutter doctor command. Here are the steps to run flutter doctor:

Flutter command not found
  1. Open a terminal or command prompt on your system.
  2. Type the command flutter doctor and press Enter.
  3. If you run the flutter doctor command, Flutter will do an inspection and report any problems it discovers. For instance, it will verify that all prerequisites have been met, that Flutter is properly installed and configured, and that your Android or iOS development environment is free of any known bugs.
  4. If any issues are found, flutter doctor will provide guidance on how to fix them. Follow the instructions provided by flutter doctor to resolve any issues.
  5. Once all issues are resolved, flutter doctor will display a message indicating that your Flutter installation is healthy and ready for development.

Verifying your Flutter installation with flutter doctor is an important step to ensure that your development environment is set up correctly and that you can start building Flutter apps without any issues. read too Button with Border Radius in Flutter

Hello, I'm Cakra. I'm currently occupied with developing an application using the Flutter framework. Additionally, I'm also working on writing some articles related to it.

You May Also Like