Muhammad Omer
Muhammad Omer

Reputation: 229

Path in .bash_profile give error: "-bash: flutter: command not found"

I am following Flutter official documentation for adding flutter Path in .bash_profile in order to run commands on terminal but it give me error -bash: flutter: command not found

Is there any quick way to add Flutter support in android studio for was Android Developers. I am trying to find the easy way to add Flutter support on running Android environment.

My .bash_profile contains the following line: export PATH="$PATH:$HOME/Developer/flutter/bin"

I have tried all my possible answers but no luck. P.S I'm using bash not zsh any other.

Upvotes: 0

Views: 674

Answers (1)

Muhammad Umair
Muhammad Umair

Reputation: 1714

I have faced the same issue. I assume that you've downloaded the flutter SDK from official docs as I did and tried so many solutions.

I resolved this issue with the following steps:

  1. download the Android Studio
  2. Open Android studio's preferences -> Plugins -> download flutter plugin
  3. File -> New -> Create New Flutter project
  4. In the next dialogue under the "Flutter SDK path" you can see install SDK... option (install the SDK from there at your desired location)
  5. Once SDK is installed then update your .bash_profile with the newly downloaded SDK.

Your .bash_profile should look something like this:

export PATH="$PATH:$HOME/Developer/flutter/bin"

enter image description here enter image description here

Upvotes: 1

Related Questions