[Solved] Unable to resolve host “” No address associated with host name [closed]

In my Android application for reading RSS links, I am getting this error:
Unable to resolve host “”;
No address associated with hostname.

In my emulator I can connect to Google through a browser.
Please help me to resolve this issue.

Solution #1:

You probably don’t have the INTERNET permission. Try adding this to your AndroidManifest.xml file, right before </manifest>:

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

Note: the above doesn’t have to be right before the </manifest> tag, but that is a good / correct place to put it.

Note: if this answer doesn’t help in your case, read the other answers!

Respondent: Felix

Solution #2:

I’ve seen this problem in the emulator as well. In my case, it is caused by launching the emulator, then putting the computer to sleep or changing the network connection (going from work to home, etc), then attempting to use the same emulator again. Closing and re-launching the emulator resolves the problem in this case.

Respondent: Eric Brynsvold

Solution #3:

It is WiFi bug due to wifi disable or not properly connected.

Simply Reconnect the wifi will solve the issue.

Respondent: shehzy

Solution #4:

Unable to resolve host “”; No address associated with hostname

you must have to check below code here on your manifest :

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

and most important at least for me:-

enabled wifi connection or internet connection on your mobile device

Respondent: duggu

Solution #5:

Sometimes, although you add <uses-permission android:name="android.permission.INTERNET" /> in the AndroidManifest and you have a WiFi connection, this exception can be thrown. In my case, I have turned off WiFi and then turned it on again. This resolved the error. Weird solution, but sometimes it works.

Respondent: Batuhan Co?kun

Solution #6:

"" it seems you are trying to resolve this host , which is invalid.

Check for rss URL

Following are the possibilities

1 Your browser is configured with proxy, app not

System.setProperty("http.proxyHost", "");
System.setProperty("http.proxyPort", "1234");

2 Your browser has access to internet. not app

3 can be an SSL issue if URL is secured

Respondent: jmj

Solution #7:

I had the same issue. My virtual device was showing a crossed-out WiFi icon at the top bar of the device. I rebooted the virtual device and everything was back to normal.

Respondent: Fo Nko

Solution #8:

Check you have:

1- Access to Internet connectivity.

2- The permission for internet is present in the manifest.

3- The url host is valid and registered in a trusted domain name server.

Respondent: Pablo Valdes

Solution #9:

It could be due to below reasons: –

  1. Either you dont have INTERNET permission in manifest file. If so then please use this statement <uses-permission android:name="android.permission.INTERNET" />

  2. Or you are connected to a network but your internet connection is not working. Like you are connected to a Wi-Fi but it doesnt have internet connection or Mobile data on your phone is ON but you dont have data connectivity on your phone.

Point# 2 is interesting and its not assumption, I have tested the same at my end.

Hope this will help you


Respondent: Summved Jain

Solution #10:

Some times on the emulator, I have to launch the browser before my app can access the Internet.

Respondent: Snicolas

Solution #11:

It’s not your fault bae, I’ve had this happen sometimes when the emulator’s in a weird state. Just restarting the emulator helped me.

Respondent: Ed Lee

Solution #12:

In my case, I had that error when I’m connected to VPN on my host but not on simulator. Turning the VPN off solved the issue

Respondent: William Kinaan

Solution #13:

If you are running the app on an emulator, make sure that it is properly connected to the internet. If it is not, the easiest way of solving it is reopening the emulator or creating a new device.

Respondent: Alex Styl

Solution #14:

I Had the same problem, and it was because the simulator somehow got in airplane mode, once this was disabled my App worked fine 🙂
I had tried everything, rebuild, clean+build and reboot android studio and reboot the computer, even reinstalling android studio..

Respondent: TWOcvfan

Solution #15:

Unable to resolve host “”; No address associated with hostname

I had this issue and I solved it by this way.



http://ipaddress/abc/def/ghi/name.php //http://97.68.XX.YY/abc/def/ghi/name.php

I solved this by this way…you have to give server ip address instead of hostname/servername.

Please try this and comment your feedback.

Respondent: Manoj Behera

Solution #16:

In my case problem was with WIFI working with IPV6 and my domain did not have IPv6 adress

Respondent: Pawe? Rutkowski

Solution #17:

Check permission for INTERNET in mainfest file and check network connectivity.

Respondent: Chetan Chaudhari

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Most Popular

To Top
India and Pakistan’s steroid-soaked rhetoric over Kashmir will come back to haunt them both clenbuterol australia bossier man pleads guilty for leadership role in anabolic steriod distribution conspiracy