一、下载SDK(非常慢)
git clone https://github.com/flutter/flutter.git -b stable
推荐使用清华镜像
https://mirrors.tuna.tsinghua.edu.cn/help/flutter-sdk.git/
二、指定环境变量
export PATH="$PATH:`pwd`/flutter/bin"
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
三、清理缓存
flutter precache
四、校验开发环境
flutter doctor
网友评论