Flutter运行MacOs网络请求报错Unhandled Exception: DioException [connection error]:...

报错信息
[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
解决方法

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

<key>com.apple.security.network.client</key>     
<true/>

相关推荐

  1. flutter ios 运行

    2024-03-24 05:46:02       21 阅读
  2. [Flutter]导入singular_flutter_sdk后运行到Android

    2024-03-24 05:46:02       19 阅读
  3. Mac运行npm run serveopensslErrorStack

    2024-03-24 05:46:02       16 阅读
  4. sqoop运行

    2024-03-24 05:46:02       42 阅读
  5. spark运行

    2024-03-24 05:46:02       10 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-03-24 05:46:02       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-03-24 05:46:02       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-03-24 05:46:02       19 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-03-24 05:46:02       20 阅读

热门阅读

  1. Scala第十一章节(Option类型和偏函数)

    2024-03-24 05:46:02       17 阅读
  2. pytorch图像数据集定义

    2024-03-24 05:46:02       17 阅读
  3. 24计算机考研调剂 | 华南师范大学

    2024-03-24 05:46:02       17 阅读
  4. 【保姆级讲解如何在Ubuntu中设置中文输入法】

    2024-03-24 05:46:02       19 阅读
  5. MongoDB聚合运算符:$indexOfArray

    2024-03-24 05:46:02       19 阅读
  6. 小程序中实现轮播图左向堆叠

    2024-03-24 05:46:02       22 阅读
  7. Python学习笔记07

    2024-03-24 05:46:02       19 阅读
  8. 如何实现JWT Token的自动续期

    2024-03-24 05:46:02       20 阅读
  9. 数据分析-Pandas分类数据的类别处理

    2024-03-24 05:46:02       18 阅读
  10. jenkins 自动下载 环境依赖包,下载超时、报错

    2024-03-24 05:46:02       17 阅读
  11. 供应链攻击揭秘:识别、防范与应对

    2024-03-24 05:46:02       18 阅读
  12. 13 转钱和查询余额

    2024-03-24 05:46:02       15 阅读
  13. 普通用户权限运行Docker

    2024-03-24 05:46:02       16 阅读
  14. MongoDb数据库介绍安装使用

    2024-03-24 05:46:02       19 阅读
  15. 英语面试研究

    2024-03-24 05:46:02       19 阅读