java.net.UnknownHostException: Unable to resolve host "api.github.com": No address associated with hostname


Solutions on the web226

Solution icon of stackoverflow
Unable to resolve host "api.github.com": No address associated with hostname

Solution icon of github
Unable to resolve host "api.github.com": No address associated with hostname

Solution icon of github
Unable to resolve host "api.github.com": No address associated with hostname

Solution icon of github
Unable to resolve host "api.github.com": No address associated with hostname

Solution icon of github
Unable to resolve host "MYEMAILHOST": No address associated with hostname

Solution icon of github
via GitHub by MisterY
, 1 year ago
Unable to resolve host "chart.finance.yahoo.com": No address associated with hostname

Solution icon of github
Unable to resolve host "swad.ugr.es": No address associated with hostname

Solution icon of github
Unable to resolve host "swad.ugr.es": No address associated with hostname

Solution icon of github
Unable to resolve host "assets.jw.org": No address associated with hostname

Solution icon of github
Unable to resolve host "assets.jw.org": No address associated with hostname

Stack trace

java.net.UnknownHostException: Unable to resolve host "api.github.com": No address associated with hostname
	at java.net.InetAddress.lookupHostByName(InetAddress.java:470)
	at java.net.InetAddress.getAllByNameImpl(InetAddress.java:252)
	at java.net.InetAddress.getAllByName(InetAddress.java:215)
	at com.android.okhttp.internal.Network$1.resolveInetAddresses(Network.java:29)
	at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:188)
	at com.android.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:157)
	at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:100)
	at com.android.okhttp.internal.http.HttpEngine.createNextConnection(HttpEngine.java:357)
	at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:340)
	at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)
	at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:433)
	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:384)
	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:231)
	at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
	at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java)
	at com.example.android.datafrominternet.utilities.NetworkUtils.getResponseFromHttpUrl(NetworkUtils.java:76)
	at com.example.android.datafrominternet.MainActivity$GithubQueryTask.doInBackground(MainActivity.java:77)
	at com.example.android.datafrominternet.MainActivity$GithubQueryTask.doInBackground(MainActivity.java:71)
	at android.os.AsyncTask$2.call(AsyncTask.java:295)
	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
	at java.lang.Thread.run(Thread.java:818)
Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
	at libcore.io.Posix.android_getaddrinfo(Native Method)
	at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:55)
	at java.net.InetAddress.lookupHostByName(InetAddress.java:451)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
5 times, 1 month ago
Once, 1 week ago
Once, 3 weeks ago
2 times, 1 month ago
40 more bugmates