android emulator and local site

Viewed 25720

I've started android emulator app and trying to open from embeded browser locally started web-site, but local dns name (from /etc/hosts) is not resolved. Is there any option to enable local resolving?

3 Answers

Here's how to access a locally hosted website in the Android emulator.

  1. Use IIS/Apache to host the application.
    For some obscure reason, Android Virtual Device would not let you connect to the development server created by Visual Studio.

  2. Once you host the application, use your IP address as the web address to connect to the local website. "localhost" just won't work with the AVD. Just go to the command prompt and type ipconfig to get your local ip address. You should be looking for IPv4 Address

Here's Android AVD connecting to Apache (XAMPP)

https://drag2up.appspot.com/Z6xc

Here's connecting to IIS

alt text

Good Luck everyone and happy testing!!

Related