Current location - Quotes Website - Collection of slogans - The problem of accessing native port by android programming.
The problem of accessing native port by android programming.
No, it depends on whether you run it on a simulator or a real machine.

If the port is redirected on the emulator, the redirected ip is generally 10.0.2. 15.

Adb telnet 5554 (connection simulator)

Redir adds tcp:5000:6000 (meaning that the information received by tcp port 5000 of Android computer is directed to TCP port 6000 of Android simulator. )

If it is a real machine, please use LAN IP, 192.438+068 or something.

The simulator gives you a link: /xiaohuawuyu/blog/8 1786.