Adb error: more than one device/emulator error handling

During the development of projects, it is often necessary to use ADB command for debugging. When the mobile phone is connected to the computer and ready to use adb shell command, the following error occurs
jason@zhanghailongdeMacBook-Pro ~ % adb shell
error: more than one device/emulator
According to the error prompt, the error is caused by the connection of multiple devices on the computer, and adb shell command does not know which one to operate, so the error is exploded. Check with ADB Devices:

jason@zhanghailongdeMacBook-Pro ~ % adb devices

List of devices attached
LGUS9982d76c740 device
192.168.201.7:5555 device
Sure enough, several devices appear. If you want to debug for a particular device, you need to specify the name of the device for adb command, such as debugging for device 2F54EE0:
jason@zhanghailongdeMacBook-Pro ~ % adb -s LGUS9982d76c740 shell
Joan:/$
In this way, it is possible to debug normally. If there is still a problem with the above method, the following scheme is recommended:
// Kill adb Server first :adb kill-server
// Restart ADB Server: ADB Start-up – Server

Read More: