How to access localhost from a Genymotion android emulator?

Update

After genymotion update to 2.2 you can use 10.0.3.2, ref

Another approach

To access your localhost through Genymotion is using your PC IP address. to get your IP address go to:

start -> cmd -> ipconfig

then search for IPv4, copy the IP and paste it in your URL. It should looks like the following:

String YourURL = "http://192.168.0.106:8888/your_script_location.php";

Hope this works too for you, give me a feedback.

P.S: if it didn't work, turn off the firewall and any anti-virus application you have in your PC.


The IP returned by ipconfig dit not work for me. However 10.0.3.2 worked for me even though the IP address in the Wifi setting is 10.0.3.15.

Genymotion 2.2.0


you need this structure

Genymotion

http://10.0.3.2/

Default AVD

http://10.0.2.2/

the http it's very important and the port it's for default It depends on your server.

you can check this url in your browser the smartphone

enter image description here