Ashu
Ashu

Reputation: 97

How to solve "'flutter' is not recognized as an internal or external command, operable program or batch file."?

I am trying to run the app from terminal in Android Studio by typing flutter run but it is saying

'flutter' is not recognized as an internal or external command,
operable program or batch file.

Now I have installed all flutter SDK, changed the environment variable of the path to flutter/bin folder, restarted it but still not working.

EDIT

enter image description here

Upvotes: 0

Views: 13288

Answers (4)

bacchilega
bacchilega

Reputation: 11

I found the solution after searching a lot.

Before downloading flutter from

https://docs.flutter.dev/get-started/install

Disable your antivirus.

Then move the folder to C: and add the exception for the antivirus you are using.

Remember to add to ENV path:

C:\Windows\System32
C:\Program Files\Git
C:\flutter\bin

Upvotes: 0

Abdifatah Mohamed
Abdifatah Mohamed

Reputation: 357

IF THE COMMAND ISN'T RECOGNIZED ONLY IN ANDROID STUDIO BUT IS WORKING FROM THE CMD

I tried all the solutions but nothings' working on my windows. Android Studio's terminal cannot 'find' the command flutter. Instead of wasting your time fixing this, I'd rather you run the commands from the Windows Command Prompt directly.

Upvotes: 0

Sevgi Aykır
Sevgi Aykır

Reputation: 9

You have to link between Android studio and flutter,dart. So you should go in android studio File->Settings->Dart and Flutter under Languages & Frameworksenter image description here

Then you should do this for flutterenter image description here

Upvotes: 0

Mariano Zorrilla
Mariano Zorrilla

Reputation: 7666

Your Path was set temporarily and non permanently. Checking the official docs, you can get the answer:

Using MacOS:

  • temporarily will be: export PATH="$PATH:`pwd`/flutter/bin"
  • permanently:
    • export PATH="$PATH:[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin"
    • source $HOME/.rc file
    • echo $PATH

Official DOCS

Using Windows:

  • From the Start search bar, enter ‘env’ and select Edit environment variables for your account.
  • Under User variables check if there is an entry called Path

Official DOCS

Upvotes: 3

Related Questions