• 输入adb shell 时 提示error: more than one device and emulator


    当我连着手机充电的时候,启动模拟器调试,执行ADB指令时,报错。
    C:Usersgaojs>adb shell
    error: more than one device and emulator
    C:Usersgaojs>adb install e:good.apk
    error: more than one device and emulator

    碰到这种情况,首先要查一下,是不是真的有多个设备或模拟器。
    C:Usersgaojs>adb devices
    List of devices attached
    emulator-5554   device
    4dfadcb86b00cf05        device
    发现还真是多个设备,那就需要为ADB命令指定设备的序列号了。
    C:Usersgaojs>adb -s emulator-5554 shell
    也就是如上所示,给命令加上-s的参数就可以了!

    如果实际上只有一个设备或模拟器,并且查到有offline的状态;
    那就说明是ADB本身的BUG所导致的,就需要用如下的方法处理下了:
    C:Usersgaojs>adb kill-server
    C:Usersgaojs>taskkill /f /im adb.exe
    第一条命令是杀ADB的服务,第二条命令是杀ADB的进程!
    如果第一条没有用,才考虑用第二条命令再试试看的!
  • 相关阅读:
    Codeforces Round #613 选讲
    Codeforces Round #612 选讲
    Codeforces917E
    一道题20
    LOJ#2244. 「NOI2014」起床困难综合症
    求欧拉回路
    *LOJ#2134. 「NOI2015」小园丁与老司机
    vim操作命令
    常见问题解决
    CentOS7下如何修改mysql的数据目录
  • 原文地址:https://www.cnblogs.com/wanghang/p/6299899.html
Copyright © 2020-2023  润新知