How to solve SocketException: Failed host lookup: 'www.xyz.com' (OS Error: No address associated with hostname, errno = 7)

后端 未结 21 2091
耶瑟儿~
耶瑟儿~ 2020-12-09 07:50

Whenever I try to do an http call after about 20 seconds I get in the console the following error:

E/flutter ( 8274): [ERROR:flutter/shell/common/shell.cc(1         


        
相关标签:
21条回答
  • 2020-12-09 08:26
    • Make sure the internet is on (both on the phone and the PC)
    • also, make sure the server is working properly
    • check your URL properly
    0 讨论(0)
  • 2020-12-09 08:28

    Try adding <uses-permission android:name="android.permission.INTERNET" /> to your AndroidManifest.xml file.

    0 讨论(0)
  • 2020-12-09 08:29

    Check if you have enabled offline work in the gradle settings. File-> Settings -> Build -> Build Tools -> Offline work

    If its enabled or checked then uncheck it.

    0 讨论(0)
提交回复
热议问题