当前位置:   article > 正文

Flutter运行MacOs网络请求报错Unhandled Exception: DioException [connection error]:..._the connection errored: connection failed this ind

the connection errored: connection failed this indicates an error which most
报错信息
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: DioException [connection error]: The connection errored: Connection failed This indicates an error which most likely cannot be solved by the library.
Error: SocketException: Connection failed (OS Error: Operation not permitted, errno = 1), address = rap2api.taobao.org, port = 80
  • 1
  • 2
解决方法

macos/macos/Runner/DebugProfile.entitlements文件中添加如下代码

<key>com.apple.security.network.client</key>     
<true/>
  • 1
  • 2
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/872581?site
推荐阅读
相关标签
  

闽ICP备14008679号