pub get failed (server unavailable) -- attempting retry 1 in 1 second?

flutter yekong 454℃

具体操作
flutter更新依赖时一直更新不了
wanjunshijiecom 2021-01-10 at 11.56.55

Linux 或 Mac

export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

Windows

新增两个环境变量即可

PUB_HOSTED_URL ===== https://pub.flutter-io.cn
FLUTTER_STORAGE_BASE_URL ===== https://storage.flutter-io.cn

执行一下 flutter doctor命令
再次执行

flutter pub get

wanjunshijiecom 2021-01-10 at 11.57.38

搞定

喜欢 (1)