切换导航
{{systemName}}
{{ info.Title }}
{{info.Title}}
{{ menu.Title }}
{{menu.Title}}
登录
|
退出
搜索
flutter How to solve SocketException: Failed host lookup
作者:ych
### Failed host lookup异常处理 调试时正常,打包后异常???? #### 案例 报错案例1: ``` E/flutter ( 8274): [ERROR:flutter/shell/common/shell.cc(184)] Dart Error: Unhandled exception: E/flutter ( 8274): SocketException: Failed host lookup: 'flutter-project-xxxxx.firebaseio.com' (OS Error: No address associated with hostname, errno = 7) ``` 报错案例2: ``` [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: DioError [DioErrorType.other]: SocketException: Failed host lookup: 'www.xxxx.com' (OS Error: No address associated with hostname, errno = 7) ``` #### 原因及解决方案 没有授权 Adding internet permission is not only a solution. You also have to make sure that you are online whether it is mobile or emulator Make sure you are online whether it is mobile or emulator Make sure you have given internet permission in your app's android/app/src/main/AndroidManifest.xml ```
```
相关推荐
Flutter打包release APK闪退百分百解决方法
Flutter报错汇总
flutter报错 Error: Connection refused
评论区
先去登录
版权所有:机遇屋在线 Copyright © 2021-2025 jiyuwu Co., Ltd.
鲁ICP备16042261号-1