1

I've read a bunch of articles on SO and around the web that all tell me that the android emulator connects to my machine with the ip address 10.0.2.2 when using localhost. Unfortunately I'm not using localhost, I've edited my hosts file so that I connect to local.blah.com when I want to view my webpage.

I thought that if I write: 10.0.2.2 local.blah.com in my host file it would allow my to see the webpage I am developing in the android emulator. (Please correct me if this was not a good assumption)

So My question is what else can I try to get my local. url to work on the android emulator.

1 Answer 1

0

You either set up a local DNS server, or else you can only use the IP address, which should work.

4
  • The IP address will not work because of http.conf which tells local.blah.com to get the files out of a directory on my computer. Have you ever installed a local DNS server, if so do you have any pointers
    – locrizak
    Jan 13, 2012 at 1:08
  • If you are using Windows, there is one included. Here are some instructions to set it up from the beginning: petri.co.il/install_and_configure_windows_2003_dns_server.htm or here is an open source alternative sourceforge.net/projects/dhcp-dns-server
    – P Varga
    Jan 13, 2012 at 1:14
  • 1
    thanks for the help. I figured out a solution modifying my site code and using localhost.
    – locrizak
    Jan 13, 2012 at 3:40
  • @locrizak: Are you happy to share it?
    – kta
    Feb 23, 2014 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.