How to access localhost from Genymotion Android emulator?

I cannot figure out how to access localhost from Genymotion's Android emulator. By the way, Im uses MAMP.

+56
android genymotion mamp emulation
Nov 28 '13 at 3:36 on
source share
9 answers

Update

After upgrading genymotion to version 2.2 you can use 10.0.3.2 , ref

Another approach

To access your local host through Genymotion, the IP address of your PC is used. to get your IP address:

 start -> cmd -> ipconfig 

then search for IPv4, copy the IP address and paste it into your URL. It should look like this:

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

Hope this works for you too, give me feedback.

PS: if it doesn’t work, disable the firewall and any anti-virus application that you have on your PC.

+136
Nov 28 '13 at 4:11
source share

The IP returned by ipconfig dit does not work for me. However, 10.0.3.2 worked for me, even if the IP address in the Wifi 10.0.3.15 .

Genymotion 2.2.0

+17
May 18 '14 at 7:18
source share

it works for me using http://192.168.56.1:8080

to find out your IP address just use the following command

  • for (mac and linux) ifconfig vboxnet0
  • windows ipconfig vboxnet0

and make sure the port is assembled.

I got a response from here

+11
Jul 19 '14 at 9:49
source share

you need this structure

Genymotion

http://10.0.3.2/

AVD by default

http://10.0.2.2/

http is very important, and it is the default port. It depends on your server.

you can check this url in your smartphone browser

enter image description here

+7
Dec 29 '15 at 4:56
source share

Introduction:

In short, Genymotion runs on Virtualbox, and the default network configuration is Host Only. This method essentially emulates a physical network that is shared between your Genymotion virtual machine (emulator) and your host machine. The network name is vboxnet0, and if you run "ifconfig vboxnet0" (or "ipconfig vboxnet0" when starting Windows) on your host computer, you should get the IP address of your host on the vboxnet0 network. The default IP address is 192.168.56.1.

Decision:

This is the IP address that should be used when accessing your host machine from the Genymotion emulator. For my Rails application, this meant calling "192.168.56.1lla000" instead of "10.0.2.2lla000".

Link

http://bbowden.tumblr.com/post/58650831283/accessing-a-localhost-server-from-the-genymotion

+5
Mar 23 '14 at 18:01
source share

Genymotion! It works for me using IP 10.0.3.2 , but depends on your localhost port. Apache it will be only IP and Tomcat with a default port of 8080 . Here I take screenshots.

1. Screenshot of Apache

Genymotion apache

2. Screenshot of Tomcat

enter image description here

Hope this is helpful. Thank!

+5
Jun 22 '15 at 3:42
source share

When I used genymotion in my ubuntu

I used the ip address of the virtual machine as a local host and it worked.

in the virtual field goto file> preferences> network> select the host-only network and select the adapter tab, copy the ipv4 address and use it instead of localhost ...

like http://192.168.56.1/qrstuff/json/

+1
Jan 13 '16 at 12:48
source share
  • run xampp (def 127.0.0.1:80) and go to Control Panel \ All Control Panel Items \ Network and Sharing Center
  • select connection

enter image description here

0
Feb 28 '16 at 11:28
source share

First check your Internet connection on your PC, then turn on Wi-Fi in your Genymotion emulator device.

After goto Cmd, by pressing ctrl + r, type Cmd and press Enter, you will see a command window

type ipconfig and press enter ...

here you can see your ipv4-type address in your Genymotion emulator device browser now, you can connect to the local web server ....

0
Mar 21 '17 at 5:29
source share



All Articles