How to connect to AVD

那年仲夏 提交于 2019-12-01 05:17:29

Telnet into the device (assuming it is on port 5554):

telnet localhost 5554

At the Android console prompt use a redirect:

redir add tcp:8080:8080

Pointing your browser to 'http://127.0.0.1:8080/' should now send, and receive to the AVD.

Courtesy of: http://www.rhill.co.uk/?p=35

Jack

While I don't know the answer to your problem directly, I do know that when connecting FROM an AVD TO your computer, you have to use 10.0.2.2 because your AVD is essentially behind another "router". It doesn't get a local lan IP from your router. See this question for more information. From this link, he quotes:

Each instance of the emulator runs behind a virtual router/firewall service that isolates it from your development machine's network interfaces and settings and from the internet. An emulated device can not see your development machine or other emulator instances on the network. Instead, it sees only that it is connected through Ethernet to a router/firewall.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!