Tags
Android
Asked 3 years ago
4 Oct 2021
Views 649
Stefanie

Stefanie posted

Android - AsyncHttpRequest error : Unable to resolve host


java.net.UnknownHostException: Unable to resolve host "exanok.com": No address associated with hostname
2021-10-05 02:27:18.593 24964-25343/com.exampleapp W/System.err:     at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:95)
2021-10-05 02:27:18.593 24964-25343/com.exampleapp W/System.err:     at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:74)
2021-10-05 02:27:18.593 24964-25343/com.exampleapp W/System.err:     at java.net.InetAddress.getAllByName(InetAddress.java:752)
2021-10-05 02:27:18.593 24964-25343/com.exampleapp W/System.err:     at cz.msebera.android.httpclient.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:44)
2021-10-05 02:27:18.593 24964-25343/com.exampleapp W/System.err:     at cz.msebera.android.httpclient.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:259)
2021-10-05 02:27:18.593 24964-25343/com.exampleapp W/System.err:     at cz.msebera.android.httpclient.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:159)
2021-10-05 02:27:18.593 24964-25343/com.exampleapp W/System.err:     at cz.msebera.android.httpclient.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:145)
2021-10-05 02:27:18.593 24964-25343/com.exampleapp W/System.err:     at cz.msebera.android.httpclient.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:131)
2021-10-05 02:27:18.593 24964-25343/com.exampleapp W/System.err:     at cz.msebera.android.httpclient.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)
2021-10-05 02:27:18.593 24964-25343/com.exampleapp W/System.err:     at cz.msebera.android.httpclient.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)
2021-10-05 02:27:18.594 24964-25343/com.exampleapp W/System.err:     at cz.msebera.android.httpclient.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:860)
2021-10-05 02:27:18.594 24964-25343/com.exampleapp W/System.err:     at cz.msebera.android.httpclient.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
2021-10-05 02:27:18.594 24964-25343/com.exampleapp W/System.err:     at com.loopj.android.http.AsyncHttpRequest.makeRequest(AsyncHttpRequest.java:146)
2021-10-05 02:27:18.594 24964-25343/com.exampleapp W/System.err:     at com.loopj.android.http.AsyncHttpRequest.makeRequestWithRetries(AsyncHttpRequest.java:177)
2021-10-05 02:27:18.594 24964-25343/com.exampleapp W/System.err:     at com.loopj.android.http.AsyncHttpRequest.run(AsyncHttpRequest.java:106)
2021-10-05 02:27:18.594 24964-25343/com.exampleapp W/System.err:     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
2021-10-05 02:27:18.594 24964-25343/com.exampleapp W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
2021-10-05 02:27:18.594 24964-25343/com.exampleapp W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
2021-10-05 02:27:18.594 24964-25343/com.exampleapp W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
2021-10-05 02:27:18.594 24964-25343/com.exampleapp W/System.err:     at java.lang.Thread.run(Thread.java:760)
2021-10-05 02:27:18.595 24964-24964/com.exampleapp V/JsonHttpRH: response body is null, calling onFailure(Throwable, JSONObject)

jaydeep

jaydeep
answered Oct 4 '21 00:00

I get this error many times when the internet or wireless disconnected.

try to re-connect with the internet, maybe it solves the problem
Post Answer