解决HTTP host https://maven.google.com/ is not reachable
- 发表于
- flutter
更新flutter之后运行flutter doctor 出现错误:
[!] HTTP Host Availability
✗ HTTP host https://maven.google.com/ is not reachable. Reason: An error occurred while checking the HTTP
host: Operation timed out
解决方法
- 找到flutter sdk的文件目录,打开flutter/packages/flutter_tools/lib/src/http_host_validator.dart
- 将https://maven.google.com/ 修改为https://dl.google.com/dl/android/maven2/
- 关闭cmd命令窗口,重新打开cmd窗口
- 去到flutter/bin目录,删除cache文件夹
- 在cmd命令窗口重新运行flutter doctor,问题解决。
原文连接:解决HTTP host https://maven.google.com/ is not reachable
所有媒体,可在保留署名、
原文连接
的情况下转载,若非则不得使用我方内容。