that's because the emulator can only work with addresses that are supported by a real DNS server.
internal names on your network are probably resolved with the help of a hosts file or specific resolv.conf configuration. the solution is to run a DNS proxy on your machine and use the -dns-server option to use it from the emulator. we may add support for internal addresses in the future, but for now, you'll have to use a proxy to do what you want, or simply use the numerical IP addresses. On Fri, Dec 19, 2008 at 9:51 AM, Christian Wiesbauer < christian.wiesba...@bdc.at> wrote: > Hi, > > > > I'm trying to make a connection with one of the hosts in my network with > following code: > > > > URL aURL = new URL(http://<hostname>:<port>/<path>); > > URLConnection conn = aURL.openConnection(); > > conn.connect(); > > > > If I use the IP address of the host everything works fine but if I change > it to the hostname I get an "UnknownHostException: Host is unresolved: > <hostname>:<port>". This only happens if I use internal hostnames, external > hostnames like google.com work! > > > > Does anybody have a solution for this problem? > > > > Best regards, > > Christian Wiesbauer > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---