问题
in original emulator I can push own etc/hosts file with list of host's (PC) local domain with this IP address:
10.0.2.2 web.loc
Which IP I must use for Genymotion emulator (network in virtual machine setting is set as "VirtualBox Host-Only Ethernet Adapter", IP in simulated Android machine is 192.168.56.101. I try 192.168.56.1 but this not work.
Thank for the help.
EDIT:
I used NAT instead of Host-Only for network and now I can connect to host PC via its real IP address.
回答1:
10.0.3.2 is the localhost IP from genymotion vm machine.
回答2:
You can open cmd then typing ipconfig.
You will see VitualBox Host-Only Network's ip that is you need!
来源:https://stackoverflow.com/questions/18788805/genymotion-which-ip-set-in-etc-hosts-file-for-access-hosts-local-webserver-vi