感谢支持
我们一直在努力

Android模拟器将本地PC机当服务器

Referring to localhost from the emulated environment


If you need to refer to your host computer’s localhost, such as when you want the emulator client to contact a server running on the same host, use the alias 10.0.2.2 to refer to the host computer’s loopback interface. From the emulator’s perspective, localhost (127.0.0.1) refers to its own loopback interface.


本地调试时,在模拟器上可以使用 10.0.2.2 ,这个地址对应PC机的 127.0.0.1 , 本人亲自验证,有效。


Android模拟器将本地PC机当服务器

赞(0) 打赏
转载请注明出处:服务器评测 » Android模拟器将本地PC机当服务器
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏