Unable to resolve host “” No address associated with hostname

后端 未结 11 1547
悲&欢浪女
悲&欢浪女 2020-12-07 22:00

I tried following this tutorial: Getting Data from the Web

I tried implementing it on Android 3.0, the latest platform for tablets, however, I get this error: \"

相关标签:
11条回答
  • 2020-12-07 22:09

    May you have taken permission

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    

    BUT

    You may have forgot to TURN ON Internet in Mobile or Whatever Device.

    0 讨论(0)
  • 2020-12-07 22:10

    This error because of you host cann't be translate to IP addresses via DNS.

    Solve of this problem :

    1- Make sure you connect to the internet (check quality of network).

    2- Make sure you take proper permission to access network

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    
    0 讨论(0)
  • 2020-12-07 22:12

    My bet is that you forgot to give your app the permission to use the internet. Try adding this to your android manifest:

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    
    0 讨论(0)
  • 2020-12-07 22:12

    I got the same error and for the issue was that I was on VPN and I didn't realize that. After disconnecting the VPN and reconnecting the wifi resolved it.

    0 讨论(0)
  • 2020-12-07 22:14

    Please, check if you have valid internet connection.

    0 讨论(0)
  • 2020-12-07 22:16

    If you see this intermittently on wifi or LAN, but your mobile internet connection seems ok, it is most likely your ISP's cheap gateway router is experiencing high traffic load.

    You should trap these errors and display a reminder to the user to close any other apps using the network.

    Test by running a couple of HD youtube videos on your desktop to reproduce, or just go to a busy Starbucks.

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