与当地的Andr​​oid模拟器连接到我的服务器瓦帕。网址 [英] connect to my wamp server with the android emulator with local. web address

查看:158
本文介绍了与当地的Andr​​oid模拟器连接到我的服务器瓦帕。网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读了一堆关于文章SO和网络上的所有告诉我,Android模拟器连接到我的机器的IP地址 10.0.2.2 时使用本地主机。不幸的是我没有使用本地主机,我已经编辑我的Hosts文件,以便我连接到 local.blah.com 当我想查看我的网页。

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.

我想,如果我写的: 10.0.2.2 local.blah.com 在我的主机文件,将允许我看到我在Android模拟器开发网页。 (请纠正我,如果这不是一个好的假设)

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)

所以我的问题是还有什么可以我试图让我的本地 URL在Android模拟器上工作。

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

推荐答案

您要么建立一个本地DNS服务器,否则你只能使用IP地址,它应该工作。

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

这篇关于与当地的Andr​​oid模拟器连接到我的服务器瓦帕。网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆