模拟器中的Web浏览器中的10.0.2.2:8080无法正常工作 [英] 10.0.2.2:8080 in web browser in emulator is not working

查看:223
本文介绍了模拟器中的Web浏览器中的10.0.2.2:8080无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在本地主机中有一个湿服务器.我试图从我的android应用程序发出http请求.但是无法正确解决.许多人说10.0.2.2:8080将从仿真器指向localhost.所以我试图从模拟器在Web浏览器中打开它.我在网址中输入"10.0.2.2/cifi/test.php".但是模拟器弹出错误消息为"net:CONNECTION_TIMED_OUT"

I have a wamp server in localhost. I tried to make http request from my android app. But cannot get it right. Many said 10.0.2.2:8080 will point to localhost from emulator. So i tried to open it in web browser from emulator. i typed in url as "10.0.2.2/cifi/test.php". But emulator popped error as "net:CONNECTION_TIMED_OUT"

需要说明:如何使我的wamp服务器在本地计算机上从模拟器的浏览器中侦听10.0.0.2:8080.

Need explanation: how to make my wamp server in local machine to listen 10.0.0.2:8080 from emulator's browser.

推荐答案

终于成功了!我使用了"10.0.2.2:80/cifi/test.php".我的wamp服务器仅侦听该端口.感谢所有想帮助我的人!

It finally worked! I used "10.0.2.2:80/cifi/test.php". My wamp server listens only to that port. Thanks to everyone who wanted to help me!

这篇关于模拟器中的Web浏览器中的10.0.2.2:8080无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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