Flutter命令行指令报错zsh: command not found: flutter

574 阅读1分钟

刚配置好Flutter环境,遇到了如下问题:

退出了终端,再次启动,输入flutter指令,报错:zsh:command not found:flutter

解决办法:

执行 open ~/.zshrc

open ~/.zshrc

然后执行 open ~/.bash_profile

open ~/.bash_profile

把 bash_profile 中的内容复制到 zshrc 中,保存后退出

执行 source ~/.zshrc ,重新加载一下

source ~/.zshrc

运行 flutter --version,查看是否解决。

flutter --version