如何从Genymotion Android模拟器访问本地主机? [英] How to access localhost from a Genymotion android emulator?

查看:350
本文介绍了如何从Genymotion Android模拟器访问本地主机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法弄清楚如何从一个Genymotion Android模拟器访问本地主机。顺便说一下,使用MAMP林

I can not figure out how to access localhost from a Genymotion android emulator. By the way, Im using MAMP.

推荐答案

更新

在genymotion更新到2.2,你可以使用 10.0.3.2 REF

After genymotion update to 2.2 you can use 10.0.3.2, ref

另一种方法

要使用你的电脑的IP地址,通过Genymotion访问你的本地主机。让您的IP地址进入:

To access your localhost through Genymotion is using your PC IP address. to get your IP address go to:

start -> cmd -> ipconfig

然后搜索对于IPv4,复制IP并粘贴到您的网址。它应该如下所示:

then search for IPv4, copy the IP and paste it in your URL. It should looks like the following:

String YourURL = "http://192.168.0.106:8888/your_script_location.php";

希望这个作品太适合你了,给我一个反馈。

Hope this works too for you, give me a feedback.

PS:如果它不工作,请关闭你有你的电脑防火墙和所有反病毒程序

这篇关于如何从Genymotion Android模拟器访问本地主机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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