从Android模拟器//本地主机Web服务器在Eclipse:如何连接到我的HTTP [英] How to connect to my http://localhost web server from Android Emulator in Eclipse

查看:285
本文介绍了从Android模拟器//本地主机Web服务器在Eclipse:如何连接到我的HTTP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能做些什么在Eclipse的Andr​​oid模拟器将其连接到我的本地Web服务器页面的http://本地主机的http:// 127.0.0.1

What can I do in Eclipse's Android emulator to connect it to my localhost web server page at http://localhost or http://127.0.0.1?

我已经试过了,但模拟器仍然需要我的要求,像谷歌搜索本地主机还是坏,它说,它没有找到的页面,而我的Web服务器运行正常。

I've tried it, but the emulator still takes my request like a Google search for localhost or worse it says that it didn't found the page while my web server is normally running.

推荐答案

的本地主机是指在其上code为运行装置中,在这种情况下,仿真器。

The localhost refers to the device on which the code is running, in this case the emulator.

如果您想引用其运行Android模拟器的电脑,使用IP地址10.0.2.2来代替。你可以阅读更多从这里

If you want to refer to the computer which is running the Android simulator, use the IP address 10.0.2.2 instead. You can read more from here.

这篇关于从Android模拟器//本地主机Web服务器在Eclipse:如何连接到我的HTTP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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