1、安装Flutter慢的方法,
Flutter官方给出了在中国能够愉快使用的方法 — Flutter中国镜像
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
git clone -b dev https://github.com/flutter/flutter.git
export PATH="$PWD/flutter/bin:$PATH"
cd ./flutter
flutter doctor
2、安装第三方包慢的解决方法
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
flutter packages get
上述export
都是临时环境变量,一劳永逸的方法是在~/.bash_profile
添加
export PATH=xxx/flutter/bin:$PATH
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
添加完以后使用source ~/.bash_profile
来更新刚配置的环境变量。xxx
是flutter的安装路径
3、Waiting for another flutter command to release the startup lock
解决方法
删除flutter的安装目录/bin/cache/lockfile
文件,然后重启开发工具。