Flutter 网络请求报错 Failed host lookup:

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Flutter 网络请求报错 Failed host lookup:相关的知识,希望对你有一定的参考价值。

参考技术A Flutter 网络请求报错 Failed host lookup:

一、如果是ios真机调试报错
1.检查iOS是否开启网络权限(在设置中检查一下),(如果HTTP,在info中 添加 ATS)

二、如果是android模拟器或真机调试报错
在debug和release目录中的AndroidManifest.xml中加上
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
如果还是不行,执行
flutter clean

以上是关于Flutter 网络请求报错 Failed host lookup:的主要内容,如果未能解决你的问题,请参考以下文章

错误记录发布 Flutter 插件包报错 ( Failed to upload the package.pub finished with exit code 1 )

flutter web应用,运行chrome web时,报错SocketException: Failed to create server socket (OS Error:

flutter项目运行报错Failed to find Build Tools revision 29.0.2

Flutter使用SingleTickerProviderStateMixin报错

Flutter解决 Failed assertion: line 5142 pos 12: ‘!_debugLocked‘: is not true.

请求接口报错netERR_FAILED