The error says that the dns server the device is talking to can't resolve
the name.  It may also mean we can't talk to the dns server.  Can you
resolve other names (google.com, cnn.com, etc)?  Are you on wifi or mobile
data?  Are you talking to a public dns server?  Is your server world
accessible and has its dns record been published?

If this is on a private network you should probably use wifi to give access
to your private dns server and the server itself.

R


On Mon, Jan 7, 2013 at 5:02 PM, Lew <lewbl...@gmail.com> wrote:

> John Merlino wrote:
>
>> I have a site up and running and I can even connect to it with the
>> emulator, and up to an hour ago I was able to connect to it with the
>> android device as well. However, now I am suddenly getting this
>> message when trying to connect to a URL while testing on the device:
>>
>> 01-07 17:52:42.650: W/System.err(24859):
>> java.net.UnknownHostException: Unable to resolve host "mysite.com": No
>> address associated with hostname
>> 01-07 17:52:42.650: W/System.err(24859):         at
>> java.net.InetAddress.**lookupHostByName(InetAddress.**java:424)
>> 01-07 17:52:42.650: W/System.err(24859):         at
>> java.net.InetAddress.**getAllByNameImpl(InetAddress.**java:236)
>> 01-07 17:52:42.650: W/System.err(24859):         at
>> java.net.InetAddress.**getAllByName(InetAddress.java:**214)
>> 01-07 17:52:42.650: W/System.err(24859):         at
>> org.apache.http.impl.conn.**DefaultClientConnectionOperato**
>> r.openConnection(**DefaultClientConnectionOperato**r.java:
>> 137)
>>
>> I tried it with emulator again and emulator still is able to connect
>> to host, but the device keeps producing the above error.
>>
>>
> What changed an hour ago?
>
> You don't give a lot of information here. I'm guessing that the device is
> not connected to the private LAN that has
> the DNS server that resolves the hostname. The emulator shares the network
> connectivity of its host; not so the
> real device.
>
> You might have to (reverse) tether the device to get it to access the LAN.
>
> --
> Lew
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to