Flutter command not found

前端 未结 30 1439
独厮守ぢ
独厮守ぢ 2020-11-29 16:54
bash: flutter: command not found

Apparently, none of the flutter commands are working on the terminal of an android studio which I believe I am tryi

30条回答
  •  情话喂你
    2020-11-29 17:19

    In Mac, There are two options to solve this issue.

    Option 1: Adding the flutter SDK path permanently(it will work in any terminal session)

    Download the flutter SDK and extract in any location and then you have to add the below line in $HOME/.bash_profile file(hidden folder as default).

    export PATH="$PATH:[where flutter sdk downloaded and extracted]/flutter/bin"

    for eg:export PATH="$PATH:~/development/tools/flutter/bin"

    Option 2: If you are facing any difficulties with Option 1, then this is much simpler but you have to do this simple step whenever you restart your system/terminal.

    Step 1: Go to the path where flutter SDK downloaded and extracted (eg: cd ~/Development/tools/)

    Step 2: Enter this command

    export PATH='pwd'/flutter/bin:$PATH

    That's it. Type "flutter doctor" to check this issue gets resolved. Happy Coding.

提交回复
热议问题