Android adb down

这段时间 启动项目的时候 经常在eclipse 连接手机的时候报:

    The connection to adb is down, and a severe error has occured.

    You must restart adb and Eclipse.

    Please ensure that adb is correctly located at 'D:\sdk\platform-tools\adb.exe' and can be executed.

网上 找的clean 项目啊 重启 eclipse和重新连接手机 都没效果。最后发现还是在 cmd 上处理 最方便。 这里留下点记录 方便以后 再遇到这种问题 好进行查找

    第一步:打开cmd

    第二步:输入  netstat -aon|findstr "5037"  查找端口号“5037”是否被占用(ADB 的绑定端口为5037)

              

    第三步:输入  tasklist|findstr "10724" (我这查出来的PID 号为10724) 根据查找出来的 PID 查找对应的线程

              

               得到的结果表明 5037端口确实别占用了,sjk_daemon.exe 是金山手机助手的可执行文件(我用的金山)

    第四步:先把数据线和手机的连接断开,然后输入  taskkill /f /im + 进程名 (第三步搜索到的进程名字,我这里是sjk_daemon.exe)

              

    第五步:运行 adb.exe (多为..\sdk\platform-tools\adb.exe )

这样下来 就可以解决 adb down 掉,端口号被占用的问题了。

                                                               ---------------给自己留下点记录,让以后少走点弯路

你可能感兴趣的:(android adb)