在应用启动时,我收到以下错误消息:SocketException:主机查找失败:“ .... co”(操作系统错误:提供了nodename或servname,或者未知,errno = 8)
我的颤振docotor -v输出也是:
Heyabs-MacBook-Pro:flutterLoginApp-master4OK heyab$ flutter doctor -v
[✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.13.6 17G65, locale en-GB)
• Flutter version 1.0.0 at /Users/heyab/flutter
• Framework revision 5391447fae (3 months ago), 2018-11-29 19:41:26 -0800
• Engine revision 7375a0f414
• Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /Users/heyab/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.1, Build version 10B61
• ios-deploy 1.9.4
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 31.3.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
[✓] VS Code (version 1.31.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 2.23.0
[✓] Connected device (1 available)
• Heyab's iPhone • 77afb908fc6c490d3fca62cdde9a74ab4e45b4f0 • ios • iOS 11.4.1
• No issues found!
答案 0 :(得分:2)
由于设备离线,我收到此错误。一旦我将设备设置为在线,该错误就不会继续存在。
答案 1 :(得分:0)
- 确保您在线(无论是移动设备还是仿真器)
- 确保您已在应用程序的android / app / src / main / AndroidManifest.xml中授予互联网许可