0. 安装xcode 在appstore里面安装
1. 安装android studio https://developer.android.google.cn/studio/ 下载,双击安装即可
2. flutter 的sdk下载 https://docs.flutter.dev/development/tools/sdk/releases?tab=macos#macos
3. flutter 的环境变量的设置
echo $PATH 查看当前环境变量设置
vim ./.bash_profile 编辑环境变量
环境变量示例:
export PATH=/Users/用户名/Documents/flutter/flutter/bin:$PATH
export ANDROID_HOME="/Users/用户名/Documents/android_sdk" //android sdk目录,替换为你自己的即可
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-tools
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
source ./.bash_profile 让环境变量生效
flutter doctor 查看flutter环境安装情况
|