macOS下报错-bash: flutter: command not found解决

372 阅读1分钟
-bash: flutter: command not found

第一步:open ~/.bash_profile 如果报错:.bash_profile does not exist. 执行:在根目录下touch .bash_profile

第二步:编辑bash_profile文件添加 export PATH=[flutter路径]/bin:$PATH 可以直接编辑或者使用命令打开:sudo vi ~/.bash_profile

第三步:source ~/.bash_profile

第四步:执行flutter doctor