Flutter 安卓虚拟机(Android emulator)调试报错: Error connecting to the service protocol:HttpException


可能的解决方法(macOS、Linux):

  • 把Android emulator的Android版本换成9.0以下(不包含9.0)

  • 关闭代理,使用国内镜像:
    添加环境变量,之后就可以不需要VP*了:

    export PUB_HOSTED_URL=https://pub.flutter-io.cn
    export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
    
    • ~/.bash_profile中添加:
    export NO_PROXY=localhost,127.0.0.1
    

    报错信息: 报错

    运行截图:截图

水平有限,仅供参考

参考:
[1]: https://github.com/flutter/flutter/issues/25112

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐