KItis
KItis

Reputation: 5626

: java.net.UnknownHostException: Unable to resolve host "hosturl": No address associated with hostname

I have android application which connect to "hosturl" over the web. This application can connect to hosturl in the initial steps, but after i try to test it for some time(say 20 or more requests), I get above exception and I can not no longer connect to above url.

If i restart my android handset, then application can again connect to the "hosturl" but again I get the exception after I have tried to connect to hosturl few number of times

Could anybody help me here If you have encounter such a behavior with an android application before.

Upvotes: 1

Views: 10626

Answers (3)

luttu android
luttu android

Reputation: 1461

Check your Internet connection. Check Wifi. Check Server.

Upvotes: 0

Eslam Amgad
Eslam Amgad

Reputation: 21

I met this and I just closed my AVD and start it again and it worked...

Upvotes: 2

Siddesh Sahu
Siddesh Sahu

Reputation: 37

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" />

Upvotes: 2

Related Questions