Flutter 出现 Pub get failed (server unavailable)问题解决
解决方法
更换国内代理镜像
添加环境变量(用户变量或系统变量都可以)
PUB_HOSTED_URL = https://mirrors.tuna.tsinghua.edu.cn/dart-pub
FLUTTER_STORAGE_BASE_URL = https://mirrors.tuna.tsinghua.edu.cn/flutter
其他镜像
https://flutter.cn/community/china
上海交大 Linux 用户组
PUB_HOSTED_URL = https://dart-pub.mirrors.sjtug.sjtu.edu.cn
FLUTTER_STORAGE_BASE_URL = https://mirrors.sjtug.sjtu.edu.cn
清华大学 TUNA 协会
PUB_HOSTED_URL = https://mirrors.tuna.tsinghua.edu.cn/dart-pub
FLUTTER_STORAGE_BASE_URL = https://mirrors.tuna.tsinghua.edu.cn/flutter
腾讯云开源镜像站
PUB_HOSTED_URL = https://mirrors.cloud.tencent.com/dart-pub
FLUTTER_STORAGE_BASE_URL = https://mirrors.cloud.tencent.com/flutter
官方镜像
PUB_HOSTED_URL = https://pub.flutter-io.cn/
FLUTTER_STORAGE_BASE_URL = https://storage.flutter-io.cn/
注:本文可分享可转发,转发请注明出自bug源