yep, you will have  the DNS problem some time if you test your app on EMULATOR.
checkout http://developer.android.com/guide/developing/tools/emulator.html
, hope it useful



On Thu, Jan 13, 2011 at 12:44 PM, Ankur Avlani <[email protected]> wrote:
> Unfortunately, the server is not local.
>
> On Wed, Jan 12, 2011 at 4:15 PM, Dan <[email protected]> wrote:
>>
>> Hello All,
>>
>> I have had this error both on emulator and a Motorola Droid while
>> using a WIFI connection.  I have surrounded the http request with WIFI
>> state checks and before and after WIFI is reported state 3
>> (WIFI_STATE_ENABLED) and a connection speed of 54 . I have also
>> confirmed, using an adb shell with the emulator, that the emulator
>> cannot ping the website in question giving a domain resolution error.
>> To compare notes with Ankur, is the server on your LAN and the IP used
>> internal? mine is.
>>
>> I have also tried AndroidHttpClient which does work on the same url.
>>
>> -Dan
>>
>> On Jan 12, 12:23 pm, Ankur Avlani <[email protected]> wrote:
>> > True, I agree with what you say.  Its just that I feel, other apps
>> > should
>> > also break or give error.
>> >
>> > Anywayz, Thanks a lot for your inputs.
>> >
>> > regards,
>> > Ankur.
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > On Wed, Jan 12, 2011 at 12:17 PM, Brill Pappin <[email protected]> wrote:
>> > > Well i suppose thats possible if your messing with the network stack,
>> > > but it's pretty low level for Java/Android.
>> > > I guess its also possible that the Android version you have has a
>> > > crappy stack or driver... or you have rooted it and have been messing
>> > > around under the covers so to speak.
>> >
>> > > There is nothing in Android really that would allow you to mess it up
>> > > that badly AFAIK, so I doubt it's your application causing the problem
>> > > if your not specifically getting under the covers.
>> >
>> > > However, the meaning of the exception is clear:
>> >
>> >
>> > > >http://download.oracle.com/javase/1.4.2/docs/api/java/net/UnknownHost...
>> > > and your app doesn't really control the process of translating a
>> > > domain to an ip.
>> >
>> > > - Brill Pappin
>> >
>> > > On Jan 12, 2:54 pm, Ankur Avlani <[email protected]> wrote:
>> > > > Somehow I have this feeling it is related to my app only.  Other
>> > > > apps on
>> > > the
>> > > > phone, I don't see any such issue.  Even when browsing on my phone,
>> > > > I
>> > > don't
>> > > > see any error.
>> >
>> > > > On Wed, Jan 12, 2011 at 11:41 AM, Kumar Bibek <[email protected]>
>> > > wrote:
>> > > > > By Wi-Fi, I meant, you phone's Wi-Fi could be turning on and off.
>> > > > > There
>> > > is
>> > > > > no other reason I can think of. It happens for me as well,
>> > > > > sometimes.
>> >
>> > > > > Kumar Bibek
>> > > > >http://techdroid.kbeanie.com
>> > > > >http://www.kbeanie.com
>> >
>> > > > > On Thu, Jan 13, 2011 at 1:10 AM, Ankur Avlani
>> > > > > <[email protected]
>> > > >wrote:
>> >
>> > > > >> I am sorry, that somehow doesn't convince me.  I am connected to
>> > > > >> the
>> > > same
>> > > > >> wifi on my laptop and i never see any web page load error on my
>> > > laptop.
>> >
>> > > > >> On Wed, Jan 12, 2011 at 11:38 AM, Kumar Bibek
>> > > > >> <[email protected]
>> > > >wrote:
>> >
>> > > > >>> Yup, then it's a problem with your Wi-Fi.
>> >
>> > > > >>> Kumar Bibek
>> > > > >>>http://techdroid.kbeanie.com
>> > > > >>>http://www.kbeanie.com
>> >
>> > > > >>> On Thu, Jan 13, 2011 at 1:07 AM, Ankur Avlani
>> > > > >>> <[email protected]
>> > > >wrote:
>> >
>> > > > >>>> I am connected to network, I am on Wifi.  If i try again it
>> > > > >>>> works.
>> > >  Its
>> > > > >>>> just random.
>> >
>> > > > >>>> On Wed, Jan 12, 2011 at 11:34 AM, Kumar Bibek
>> > > > >>>> <[email protected]
>> > > >wrote:
>> >
>> > > > >>>>> This error/exception comes because of no network connectivity.
>> >
>> > > > >>>>> Kumar Bibek
>> > > > >>>>>http://techdroid.kbeanie.com
>> > > > >>>>>http://www.kbeanie.com
>> >
>> > > > >>>>> On Thu, Jan 13, 2011 at 1:02 AM, Ankur Avlani <
>> > > [email protected]>wrote:
>> >
>> > > > >>>>>> Hi All,
>> >
>> > > > >>>>>> I am developing an application on Android.  I have seen that
>> > > > >>>>>> at
>> > > times
>> > > > >>>>>> when I try to connect using HttpURLConnection, for getting an
>> > > Image or
>> > > > >>>>>> anydata, I get the following error:
>> >
>> > > > >>>>>> 01-12 11:24:05.073: WARN/System.err(16780):
>> > > > >>>>>> java.net.UnknownHostException: Host is
>> > > > >>>>>> unresolved:www.XXX.com:80.
>> >
>> > > > >>>>>> Note: I get this error on my Motorolla Droid and not in
>> > > > >>>>>> emulator.
>> >
>> > > > >>>>>> Any ideas?
>> >
>> > > > >>>>>> Thanks,
>> > > > >>>>>> Ankur
>> >
>> > > > >>>>>>  --
>> > > > >>>>>> You received this message because you are subscribed to the
>> > > > >>>>>> Google
>> > > > >>>>>> Groups "Android Developers" group.
>> > > > >>>>>> To post to this group, send email to
>> > > > >>>>>> [email protected]
>> > > > >>>>>> To unsubscribe from this group, send email to
>> > > > >>>>>>
>> > > > >>>>>> [email protected]<android-developers%2Bunsubs
>> > > > >>>>>> [email protected]><android-developers%2Bunsubs
>> > > [email protected]>
>> > > > >>>>>> 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
>> > > > >>>>> [email protected]
>> > > > >>>>> To unsubscribe from this group, send email to
>> > > > >>>>>
>> > > > >>>>> [email protected]<android-developers%2Bunsubs
>> > > > >>>>> [email protected]><android-developers%2Bunsubs
>> > > [email protected]>
>> > > > >>>>> 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
>> > > > >>>> [email protected]
>> > > > >>>> To unsubscribe from this group, send email to
>> > > > >>>>
>> > > > >>>> [email protected]<android-developers%2Bunsubs
>> > > > >>>> [email protected]><android-developers%2Bunsubs
>> > > [email protected]>
>> > > > >>>> 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
>> > > [email protected]
>> > > > >>> To unsubscribe from this group, send email to
>> > > > >>>
>> > > > >>> [email protected]<android-developers%2Bunsubs
>> > > > >>> [email protected]><android-developers%2Bunsubs
>> > > [email protected]>
>> > > > >>> 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
>> > > [email protected]
>> > > > >> To unsubscribe from this group, send email to
>> > > > >>
>> > > > >> [email protected]<android-developers%2Bunsubs
>> > > > >> [email protected]><android-developers%2Bunsubs
>> > > [email protected]>
>> > > > >> 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
>> > > [email protected]
>> > > > > To unsubscribe from this group, send email to
>> > > > >
>> > > > > [email protected]<android-developers%2Bunsubs
>> > > > > [email protected]><android-developers%2Bunsubs
>> > > [email protected]>
>> > > > > 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
>> > > [email protected]
>> > > To unsubscribe from this group, send email to
>> > >
>> > > [email protected]<android-developers%2Bunsubs
>> > > [email protected]>
>> > > 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 [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to