1.下载安装包之后执行flutter doctor
报错:zsh: command not found: flutter
2.执行flutter doctor
,按照提示升级xcode、安装需要的插件
3.flutter 添加全局环境变量
flutter *
命令。vim $HOME/.bash_profile
。export PUB_HOSTED_URL=https://pub.flutter-io.cn //国内用户需要设置
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn //国内用户需要设置
export PATH=~/Desktop/yzbao/flutter/bin:$PATH
echo $PATH
命令验证目录是否在已经在PATH中。4.打开模拟器open -a Simulator
5.flutter run
就ok啦