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

报错信息
bash 复制代码
[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文件中添加如下代码

bash 复制代码
<key>com.apple.security.network.client</key>     
<true/>
相关推荐
SoaringHeart3 小时前
Flutter进阶:基于 EasyRefresh 的下拉刷新封装 n_easy_refresh_mixin.dart
前端·flutter
月光下的丝瓜1 天前
Flutter 国内安装指南
前端·flutter
Mintimate2 天前
WorkBuddy 上手: 让脚本项目 Homebrew CN 变成会排障的 Agent
macos·边缘计算·agent
恋猫de小郭4 天前
Amper 正式转正 Kotlin Toolchain ,Gradle 未来何去何从
android·前端·flutter
fthux4 天前
如果你用 Mac,那你可能需要 Noti Shift
macos·开源·github
张风捷特烈4 天前
Flutter 类库大揭秘#02 | path_provider 各平台实现
前端·flutter
TT_Close5 天前
别劝退了!5秒搞定 Flutter 鸿蒙 FVM 起跑线
flutter·harmonyos·visual studio code
你听得到115 天前
用户说 App 卡,但说不清在哪?我把 Flutter 监控 SDK 升级成了链路观测工作台
前端·flutter·性能优化
stringwu6 天前
Flutter 开发必备:MVI 架构的高效实现指南
前端·flutter
counterxing6 天前
最近发现一个 Mac 工具,有点像把 Raycast、语音输入法、截图和录屏塞到了一起
macos·ai编程·claude