[已解决] Got socket error trying to find package coverage at http://pub.dartlang.org

遇到的问题:

执行:flutter doctor报错
Got socket error trying to mac find package html at https://pub.flutter-io.cn.

全网修复方案:依然无效!!!
 export PUB_HOSTED_URL=https://pub.flutter-io.cn
 export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
解决办法:

使用以下镜像站,替换上面的开源社区镜像站;

腾讯云开源镜像站

$ export PUB_HOSTED_URL=https://mirrors.cloud.tencent.com/dart-pub
$ export FLUTTER_STORAGE_BASE_URL=https://mirrors.cloud.tencent.com/flutter

上海交大 Linux 用户组

$ export PUB_HOSTED_URL=https://mirrors.sjtug.sjtu.edu.cn/dart-pub
$ export FLUTTER_STORAGE_BASE_URL=https://mirrors.sjtug.sjtu.edu.cn

清华大学 TUNA 协会

$ export PUB_HOSTED_URL=https://mirrors.tuna.tsinghua.edu.cn/dart-pub
$ export FLUTTER_STORAGE_BASE_URL=https://mirrors.tuna.tsinghua.edu.cn/flutter

OpenTUNA

$ export PUB_HOSTED_URL=https://opentuna.cn/dart-pub
$ export FLUTTER_STORAGE_BASE_URL=https://opentuna.cn/flutter

CNNIC

$ export PUB_HOSTED_URL=http://mirrors.cnnic.cn/dart-pub
$ export FLUTTER_STORAGE_BASE_URL=http://mirrors.cnnic.cn/flutter

你可能感兴趣的:([已解决] Got socket error trying to find package coverage at http://pub.dartlang.org)