[英]How to access the wamp localhost in android device for testing?
在模拟器中,我使用这个 10.0.2.2 ip 地址来测试它工作正常的应用程序,但它不适用于在 android 设备中进行测试。我通过 USB 电缆连接设备。如何使用本地主机在设备中测试应用程序。谁能知道帮我。
USB won't provide network to you. USB 不会为您提供网络。
Hope this will help you.希望这会帮助你。
How can I access my localhost from my Android device? 如何从我的 Android 设备访问我的本地主机?
使用 WIFI 这是您问题的最佳解决方案......并使用您的 IP 地址进行连接......从 android 设备到本地服务器..:-)
使用 Connectify 软件,并在您的 android 代码中插入系统的 IP 地址,而不是 10.0.0.2。
I hope this help.我希望这会有所帮助。
For Windows 10 Users对于 Windows 10 用户
- go to Control Panel-> System and Security->Windows Defender Firewall->Turn Windows Defender Firewall on or off.
转到“控制面板”->“系统和安全”->“Windows Defender 防火墙”->“打开或关闭 Windows Defender 防火墙”。
Set both private and public network settings to off.将专用和公共网络设置都设置为关闭。
open a command prompt.
打开命令提示符。 type ipconfig and note your IP.
输入 ipconfig 并记下您的 IP。
on your android device open a browser and type in your pc's IP.
在您的安卓设备上打开浏览器并输入您电脑的 IP。
I used this with WIFI and it worked fine.我将它与 WIFI 一起使用,效果很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.