Eclipse For Mac 的坑

版权声明:本文为博主原创文章,未经博主授权不得转载。

Mac上的eclipse出现如下错误的解决方案:
The connection to adb is down, and a severe error has occured.
ADB server didn't ACK

解决方案:

  1. 先把eclipse和Genymotion关闭。
  2. 命令行进入你的android SDK 的platform-tools下。
  3. 执行命令 `./adb shell adb kill-server 关闭adb进程。

如果出现下面错误,需要查找占用5037端口的进程,并杀死这些进程。

adb server is out of date. killing... cannot bind 'tcp:5037' ADB server didn't ACK` 
failed to start daemon * error:
  1. 执行命令lsof -i tcp:5037 。 查看占用5037端口的进程。adb 使用端口5037.

输出:

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME 
adb 4246 User 10u IPv4 0x89825d304bfc8555 0t0 TCP localhost:5037 (LISTEN) 
adb 4246 User 11u IPv4 0x89825d304c2f687d 0t0 TCP localhost:5037->localhost:59971 (ESTABLISHED) 
adb 4246 User 13u IPv4 0x89825d304bf04a6d 0t0 TCP localhost:5037->localhost:59973 (ESTABLISHED) 
adb 4248 User 3u IPv4 0x89825d304b635e4d 0t0 TCP localhost:59971->localhost:5037 (ESTABLISHED) 
adb 4250 User 3u IPv4 0x89825d304c2fa87d 0t0 TCP localhost:59973->localhost:5037 (ESTABLISHED)
  1. kill进程 找到进程的PID,使用kill命令:kill PID(进程的PID,如4246),杀死对应的进程

  2. 重启eclipse。

你可能感兴趣的:(Eclipse For Mac 的坑)