Flutter

HTTP Host Availability

2022-04-29  本文已影响0人  心猿意码_

错误提示如下,分析可知是 maven.google.com 访问失败造成的:
HTTP host https://maven.google.com/ is not reachable. Reason: An error occurred while checking the HTTP host: Operation timed out

image.png

解决步骤:

  1. 打开/path-to-flutter-sdk/packages/flutter_tools/lib/src/http_host_validator.dart文件,修改https://maven.google.com/为 google maven 的国内镜像,如https://maven.aliyun.com/repository/google/
  2. 删除/path-to-flutter-sdk/bin/cache 文件夹
  3. 重新执行flutter doctor
    image.png

参考: https://zhuanlan.zhihu.com/p/480002331

上一篇下一篇

猜你喜欢

热点阅读