Genymotion - which IP set in etc/hosts file for access host's local webserver via domain?

試著忘記壹切 提交于 2019-12-01 15:28:04

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!