行业知识
Flutter运行MacOs网络请求报错Unhandled Exception: DioException [connection error]:...
2026-11-04 04:11:09
来源:互联网转载
报错信息
[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文件中添加如下代码
com.apple.security.network.client
下一篇:海外服务器怎么这么贵?