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

[☠] 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

 解决办法:
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/

kPubDevHttpHost 改为https://pub.flutter-io.cn/

kgCloudHttpHost 改为https://storage.flutter-io.cn/


3、进入到flutter\bin目录,删除cache目录下的flutter_tools.snapshot 文件
4、新开一个cmd,在cmd命令窗口重新运行flutter doctor,问题解决。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值