解决ADB错误“more than one device and emulator”

    如果手机和虚拟机同时连接电脑,当你在cmd中输入以下命令时:
C:\Users\909844>adb shell
error: more than one device and emulator
C:\Users\909844>adb remount
error: more than one device and emulator
   碰到这种情况,说明当前任务栈中有多个设备或模拟器。
C:\Users\909844>adb devices
List of devices attached
emulator-5554   device
emulator-5552   device
    发现还真是多个设备,那就需要为ADB命令指定设备的序列号了。
C:\Users\909844>adb -s emulator-5554 shell

   也就是如上所示,给命令加上-s的参数就可以了。


   可是一般会出现这种情况,实际上只是连接到了一个设备,而出现这个错误提示,那就说明是ADB本身的BUG所导致的,就需要用如下的方法处理下了:

C:\Users\909844>adb kill-server

   这条命令是杀死ADB服务的命令。


   然后重新连接设备,应该不会再出现类似的情况。

猜你喜欢

转载自blog.csdn.net/aaa1050070637/article/details/68487629