Flutter command not found

前端 未结 30 1331
独厮守ぢ
独厮守ぢ 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:08

    On macOS Catalina ,The issue is with Path

    1. Open Terminal & check the shell [command : echo $SHELL ],

    If output is /bin/bash

    We need to convert to Zsh. Zsh is only the default shell on newly created user accounts, so any existing accounts you have on an upgraded Mac will still use Bash by default unless you change it. simply run the chsh -s (change shell) command in a Terminal window.

    [command : chsh -s /bin/zsh ]

    Enter your password when prompted. After you close the terminal window and reopen it, you’ll be using Zsh.

    1. Update your Path

    2.1. Open the zshrc file [command : vim ~/.zshrc ]

    2.2. Press 'I' to insert the path as [ export PATH=~/Dev/flutter/bin:$PATH ] ,here ~/Dev/ is the Folder where Flutter is installed

    2.3. Hit ESC Key and then :wq to save and exit the file

    1. Done ! try [command : flutter doctor ]

提交回复
热议问题