flutter报错HTTP Host Availability (the doctor check crashed)的解决办法

601 阅读1分钟

[☠] HTTP Host Availability (the doctor check crashed)

X Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know about this issue at https://github.com/flutter/flutter/issues.

X HandshakeException: Connection terminated during handshake

image.png

解决办法: 1、找到flutter sdk的文件目录,打开下面路径文件

flutter\packages\flutter_tools\lib\src\http_host_validator.dart

2、找到以下链接替换

maven.google.com/ 改为 dl.google.com/dl/android/…

kPubDevHttpHost 改为pub.flutter-io.cn/

kgCloudHttpHost 改为storage.flutter-io.cn/

3、进入到flutter\bin目录,删除cache目录下的flutter_tools.snapshot 文件

4、新开一个cmd,在cmd命令窗口重新运行flutter doctor,问题解决。

————————————————

版权声明:本文为CSDN博主「--勇」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

原文链接:blog.csdn.net/a506602491/…