Flutter Fix
No Result
View All Result
  • Login
  • Register
  • Media
    • Music
    • Video
    • Images
    • Gallery
  • Flutter Apps
    • Finance App
    • Weather App
    • Video App
    • Music App
    • Shopping App
    • World Clock
    • ECommerce
    • Mobile Web Browser
  • Menu
    • Buttons
    • App Bar
    • Floating Action Button
    • Toast
    • Tab Bar
    • Swipe
  • Components
    • Developers Point
    • Animations
    • Loading
    • Flutter Packages
    • WebView
  • Inputs
    • Forms
    • TextField
    • Toggle Button
    • Download
    • Widgets
  • Games
  • UI
    • Material Design
    • Card
    • Flutter Widgets
    • Neomorphism
    • Navigation
  • Navigation
  • Q&A
  • Dart
    • Flutter Methods
FORUM
ASK QUESTION
  • Media
    • Music
    • Video
    • Images
    • Gallery
  • Flutter Apps
    • Finance App
    • Weather App
    • Video App
    • Music App
    • Shopping App
    • World Clock
    • ECommerce
    • Mobile Web Browser
  • Menu
    • Buttons
    • App Bar
    • Floating Action Button
    • Toast
    • Tab Bar
    • Swipe
  • Components
    • Developers Point
    • Animations
    • Loading
    • Flutter Packages
    • WebView
  • Inputs
    • Forms
    • TextField
    • Toggle Button
    • Download
    • Widgets
  • Games
  • UI
    • Material Design
    • Card
    • Flutter Widgets
    • Neomorphism
    • Navigation
  • Navigation
  • Q&A
  • Dart
    • Flutter Methods
No Result
View All Result
Flutter Fix
No Result
View All Result
Home Flutter Top Questions & Answers

How to solve “Flutter command not found” Error

August 8, 2020
in Flutter Top Questions & Answers
4 min read
flutter command not found

Question:

bash: flutter: command not found

Apparently none of the flutter commands are working on the terminal of android studio which I believe I am trying to run it at the root of my project.

RELATED FLUTTER RESOURCES

How to fix “flutter run: No connected devices”

How to remove debug banner in flutter on android emulator?

Answer 1:

You need to correctly set up your flutter path.

ADVERTISEMENT

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

Answer 2:

Tried out all the above methods, but all of them lasted only until the terminal was open. So I went ahead and directly added it to the path file permanently.

sudo nano /etc/paths

add this to the file

/Users/yourUserName/Development/flutter/bin

Save the file, Tada!

Answer 3:

Do the following steps:

  1. Download the Flutter SDK Flutter SDK Archive
  2. Extract it where do you want (for example /home/development/flutter)
  3. Set your PATH, edit your file with this command gedit ~/.profile, you need to add this line

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

I showed you above where I’ve extracted mine, so my export will look like this

export PATH=/home/myUser/development/flutter/bin:$PATH
  1. Save the file and close it.
  2. Run source ~/.profile to load the changes
  3. If you run now flutter doctor should work!

Answer 4:

If you are using zsh, you need to follow below steps in mac.

  • Download latest flutter from the official site.
  • Unzip it and move to the $HOME location of your mac.
  • Add to path via .zshrc file
    • run nano ~/.zshrc into iTerm2 terminal.
    • export PATH=$HOME/flutter/bin:$PATH
    • Save and close ~/.zshrc file.
    • re-start iTerm2
  • Now you will have flutter available.

One if the Answers above should be able to answer your question.

RelatedFlutter Resource

flutter run no connected devices
Flutter Top Questions & Answers

How to fix “flutter run: No connected devices”

August 8, 2020
Flutter Top Questions & Answers

How to remove debug banner in flutter on android emulator?

August 8, 2020
Next Post
flutter run no connected devices

How to fix "flutter run: No connected devices"

A Full Mobile Web Browser Created with Flutter + Source Code

A Full Mobile Web Browser Created with Flutter + Source Code

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended Stories

A Music Mp3 Streaming and Downloading App made with Flutter

A Music Mp3 Streaming and Downloading App made with Flutter

August 16, 2020
A Simple Flutter Sliding Switch – Like A Toggle Button

A Simple Flutter Sliding Switch – Like A Toggle Button

August 16, 2020
Corona Virus Tracker App Built with Flutter

Corona Virus Tracker App Built with Flutter

September 1, 2020

Popular Stories

  • FLUTTER-FUTUER-APP-DEVELOPMENT

    Why Google Flutter Is the Future of Mobile App Development

    0 shares
    Share 0 Tweet 0
  • Container Widget & Box Model in Flutter – All You Need To Know

    0 shares
    Share 0 Tweet 0
  • Flutter Future, Await, and Async – All You Need To Know

    0 shares
    Share 0 Tweet 0
  • Create a Beautiful & Customized Tab/Toggle in Flutter

    0 shares
    Share 0 Tweet 0
  • Flutter Form & FormField Widget – Implementation & Example

    0 shares
    Share 0 Tweet 0
  • HOME
  • ABOUT US
  • CONTACT US
  • DMCA
  • TERMS & CONDITIONS
  • PRIVACY POLICY
Call us: +234 705 505 5426

© 2020 FlutterFix - Best Flutter Tool, Library, Source Code, Forum and Tutorials FlutterFix.

No Result
View All Result
  • Media
    • Music
    • Video
    • Images
    • Gallery
  • Flutter Apps
    • Finance App
    • Weather App
    • Video App
    • Music App
    • Shopping App
    • World Clock
    • ECommerce
    • Mobile Web Browser
  • Menu
    • Buttons
    • App Bar
    • Floating Action Button
    • Toast
    • Tab Bar
    • Swipe
  • Components
    • Developers Point
    • Animations
    • Loading
    • Flutter Packages
    • WebView
  • Inputs
    • Forms
    • TextField
    • Toggle Button
    • Download
    • Widgets
  • Games
  • UI
    • Material Design
    • Card
    • Flutter Widgets
    • Neomorphism
    • Navigation
  • Navigation
  • Q&A
  • Dart
    • Flutter Methods

© 2020 FlutterFix - Best Flutter Tool, Library, Source Code, Forum and Tutorials FlutterFix.

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In