简体   繁体   English

如何从NOX应用程序播放器android模拟器访问localhost?

[英]How to access localhost from a NOX app player android emulator?

I need to get access to my wamp server localhost from NOX app player . 我需要从NOX app player访问我的wamp服务器localhost。

Which link I could use to get it. 我可以使用哪个链接来获取它。 the 10.0.2.2 not working with it... 10.0.2.2不使用它...

I found the IP to be 172.17.100.2. 我发现IP为172.17.100.2。 Found this out by installing the Android "Fing" app to browse the network and tried the first result. 通过安装Android“Fing”应用程序来浏览网络并尝试了第一个结果。 Works great. 效果很好。 Not sure why NOX didn't stick with the usual 10.0.2.2 like most other emulators I've used. 不知道为什么NOX不像我用过的大多数其他仿真器那样坚持通常的10.0.2.2。

Use your machines ip address if you are connected to a network eg 10.70.10.3 instead of using 127.0.0.1/localhost 如果您连接到网络,例如10.70.10.3而不是使用127.0.0.1/localhost,请使用您的机器IP地址

credit: sechanakira's comment 信用:sechanakira的评论

This has worked for me. 这对我有用。 My machine is connected to a LAN. 我的机器连接到LAN。

Steps: 脚步:

  1. Run ipconfig to get my IP. 运行ipconfig以获取我的IP。
  2. Replace 127.0.0.1 with my IP in NOX app player 在NOX app播放器中将127.0.0.1替换为我的IP

With NOX 3.7.0 I can connect to host machine using 192.168.56.1. 使用NOX 3.7.0,我可以使用192.168.56.1连接到主机。

It listed in ipconfig /all (I use windows 10) 它在ipconfig / all中列出(我用windows 10)

NOX 3.7.6.3.I use PC's ip and port number (for example 192.168.0.200:80). NOX 3.7.6.3。我使用PC的IP和端口号(例如192.168.0.200:80)。 ip from ipconfig, port - whatever you set for your localhost(80 by default). ip from ipconfig,port - 无论你为localhost设置什么(默认为80)。 And it works with Nox app player 6.2.5.3. 它适用于Nox app player 6.2.5.3。

This is working for Genymotion. 这适用于Genymotion。 Try to change your IP to http://10.0.3.2/ instead 10.0.2.2. 尝试将您的IP更改为http://10.0.3.2/而不是10.0.2.2。 Reply whether this works or not. 回复是否有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM