The first scenario: do use multiple devices or simulators
Workaround: (Specify a device or emulator to connect to)
1. Get the simulator/device list
2. Specify device to execute ADB shell
For example:
|
adb -s emulator-5554 shell |
In multi-device, executing the ADB command typically requires the device to be specified with the parameter-S. For example, uninstalling the package on emulator-5554 Com.soft.cameraadb -s emulator-5554 uninstall com.soft.camera
In the second case: there is a device or simulator (there is a number that is displayed because this device has been used two times with the command ADB devices will see this device in two ways: offline and device)
Workaround:
General approach: Enter ADB start-server in the command window to restart the Adb.exe service
If the above method is not possible, the ultimate method: Open the taskbar, select the "Process" tab, find the Adb.exe process, end it, restart the finished ok (or in the Command Window Input command adb kill-server)
Prompt error:more than one device and emulator when entering ADB shell