Solve the problem that port 5037 is occupied when connecting to the mobile phone during Android development and debugging

The principle is to query the pid based on the port and end the process occupying port 5037.

step:

1. Use the cmd command line to view the PID corresponding to the occupied port.

Enter the command: netstat -aon|findstr + "port number"

Now to find the process using port 5037, then use netstat -aon|findstr "5037"

result:

Obviously, the process with pid 31088 occupies port 5037. (Of course, you can also use the command to verify, command: tasklist|findstr "31088")

The next step is to close the process with pid 31088.

Command to end the process:
taskkill -pid process number -f

So, the next step is to enter taskkill -pid 31088 -f

The effect is as follows:

Guess you like

Origin blog.csdn.net/yeziyfx/article/details/134069928