connect to my wamp server with the android emulator with local. web address

岁酱吖の 提交于 2019-12-11 06:41:31

问题


I've read a bunch of articles on SO and around the web that all tell me that the android emulator connects to my machine with the ip address 10.0.2.2 when using localhost. Unfortunately I'm not using localhost, I've edited my hosts file so that I connect to local.blah.com when I want to view my webpage.

I thought that if I write: 10.0.2.2 local.blah.com in my host file it would allow my to see the webpage I am developing in the android emulator. (Please correct me if this was not a good assumption)

So My question is what else can I try to get my local. url to work on the android emulator.


回答1:


You either set up a local DNS server, or else you can only use the IP address, which should work.



来源:https://stackoverflow.com/questions/8844576/connect-to-my-wamp-server-with-the-android-emulator-with-local-web-address

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