新安装flutter后运行 flutter doctor
,报错如下:
% flutter doctor
Downloading Material fonts... 111ms
Downloading Material fonts... 100ms
Failed to download
https://storage.googleapis.com/flutter_infra_release/flutter/fonts/3012db47f3130
e62f7cc0beabff968a33cbec8d8/fonts.zip. Ensure you have network connectivity and
then try again.
SocketException: Connection reset by peer (OS Error: Connection reset by peer,
errno = 54), address = storage.googleapis.com, port = 57100
解决方案:
Mac系统下执行:export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
即可。