When I connected to the phone to charge, I started the emulator debugging and executed ADB instruction, and reported an error.
C:\Users\gaojs> adb shell
error: more than one device and emulator
C:\Users\gaojs> adb install e:\good.apk
error: more than one device and emulator
In this case, first check to see if there are actually multiple devices or simulators.
C:\Users\gaojs> Adb devices
List of devices attached
emulator-5554 device
4dfadcb86b00cf05 device
you can find out that there are multiple devices, so you need to specify the device serial number for the adb command.
C:\Users\gaojs> Adb -s emulator-5554 shell
as shown above, add the -s parameter to the command! If there is actually only one device or simulator, and we have offline status;
, which means that ADB has a BUG, needs to be handled in the following way:
C:\Users\gaojs>
adb kill-server
C:\Users\gaojs>
Taskkill /f /im adb. Exe
the first command is a service to kill adb and the second command is a process to kill adb!
if the first command doesn’t work, consider using the second command to try again!
C:\Users\gaojs> adb shell
error: more than one device and emulator
C:\Users\gaojs> adb install e:\good.apk
error: more than one device and emulator
In this case, first check to see if there are actually multiple devices or simulators.
C:\Users\gaojs> Adb devices
List of devices attached
emulator-5554 device
4dfadcb86b00cf05 device
you can find out that there are multiple devices, so you need to specify the device serial number for the adb command.
C:\Users\gaojs> Adb -s emulator-5554 shell
as shown above, add the -s parameter to the command! If there is actually only one device or simulator, and we have offline status;
, which means that ADB has a BUG, needs to be handled in the following way:
C:\Users\gaojs>
adb kill-server
C:\Users\gaojs>
Taskkill /f /im adb. Exe
the first command is a service to kill adb and the second command is a process to kill adb!
if the first command doesn’t work, consider using the second command to try again!