以下是我所找到的有效的解决方法:
1.首先确保 eclipse 已经关闭。如果 eclipse 还处于打开状态,请从任务管理器的进程列表中杀死 eclipse 。
2.在 Windows 上可以通过 %USERPROFILE%/,在 Linux/OS X 上通过 “~” (可以从桌面载入这个文件夹),进入当前目录。
3.进入 .android 文件夹 (这个文件夹可能是一个隐藏文件夹)
4.删除 .android 文件夹中的 “cache” 文件夹以及里面的全部内容。
5.删除 .android 文件夹中的 “ddms.cfg” 文件。
6.打开 eclipse。
希望以上方法对你有效。
如果上边这个不行,就用下边这个:
196down vote
Same problem, stuck at 0%. Ran
/Applications/eclipse/eclipse -clean
and everything worked great again. Modify that path for linux boxes.
Update (from the remark from @Janusz )
For mac users with eclipse outside application directory your clean command will looks similar to:
path/eclipse/Eclipse.app/Contents/MacOS/eclipse -clean
就是cmd进入你的eclipse安装路径,执行这个命令:eclipse -clean