Flutter环境变量配置好之后,运行flutter doctor出现问题如下:
错误信息为:✗ HTTP host https://maven.google.com/ is not reachable. Reason: An error occurred while checking the HTTP host: Operation timed out
解决办法如下:
1、找到flutter sdk的文件目录,打开flutter\packages\flutter_tools\lib\src\http_host_validator.dart
2、将https://maven.google.com/ 修改为https://dl.google.com/dl/android/maven2/
3、去到flutter\bin目录,删除cache文件夹
4、重新打开终端窗口,重新执行flutter doctor。