본문 바로가기

SocketException2

Flutter 플러터에서 Dart http 패키지를 사용하여 localhost:8000을 가리키는 방법은 어떻게 되나요?, How to point to localhost:8000 with the Dart http package in Flutter? 질문 I'm following the Flutter Networking/HTTP tutorial to do a GET request to a server running on my localhost:8000. Visiting my localhost via my browser works fine. My code looks like this: var url = 'http://localhost:8000'; Future getUnits(String category) async { var response = await httpClient.get('$url/$category'); return response.body; } This works fine when I point to any real URL, such as.. 2023. 8. 11.
Flutter 소켓 예외 해결 방법: 호스트 조회 실패 : 'www.xyz.com' (OS 오류 : 호스트 이름과 연관된 주소 없음, errno = 7), How to solve SocketException: Failed host lookup: 'www.xyz.com' (OS Error: No address associated with host.. 질문 20초 후에 http 호출을 시도하면 콘솔에서 다음 오류가 발생합니다: 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) 이 오류는 앱 http 패키지를 통해 호출하는 모든 메서드 및 모든 경로에서 발생합니다. 저는 안드로이드 스튜디오의 AVD 가상 장치를 사용하여 Windows에서 플러터 앱을 개발하고 있습니다... 2023. 5. 31.