When Android Studio cleans, rebuilds, and runs the project, it inexplicably prompts "The software in your host has terminated an established connection." The
first reaction must be which application is occupying my adb port.
Win+R, enter cmd , Enter netstat -ano|findstr "5 037"
PID: 18424.
Taskbar-Right mouse button-Task manager-Details-PID sort
Scenario 1 successfully found the process of the occupied ADB port
Generally, it ends here. The process found is some pea pods, the mobile assistant ADB of the application treasure, and the software assistant.
Then try again, End.
Scene 2 does not play cards according to common sense
It’s me who occupies the adb 5037 port.
Kill, retry, ...
invalid.
Kill adb again, exit Android Studio, restart the computer,
but it still doesn’t work.
Turn off your own hotspot WiFi, or try to adjust your own network, switch from wireless to wired, or switch from wired to wireless.
Clean, rebuild, run... Perfect solution