Eclipse挂起在Android SDK内容加载器上

本文翻译自:Eclipse hangs at the Android SDK Content Loader

I've been working with Eclipse 4.2 (Juno release 20120920-0800) on OS X 10.8.2 for a few weeks now, building apps for Android 3.0 and above. 我已经在OS X 10.8.2上使用Eclipse 4.2(Juno发布20120920-0800)几周了,为Android 3.0及更高版本构建应用程序。 I have a quad core i7 MacBook Pro with an SSD, so performance is not an issue. 我有一个带有SSD的四核i7 MacBook Pro,因此性能不是问题。 Everything was fine. 一切都很好。

At some point I imported an Android project that required Android 2.2, so I installed that using the Android SDK manager (v.21). 在某些时候我导入了一个需要Android 2.2的Android项目,所以我使用Android SDK管理器安装了它(v.21)。 Ever since then, working with Eclipse takes forever. 从那时起,使用Eclipse需要永远。 First of all, it will print the following in the status message at the bottom right: 首先,它将在右下方的状态消息中打印以下内容:

Android SDK Content Loader: (0%) Android SDK内容加载器:(0%)

This takes two minutes or so. 这需要两分钟左右。 The specific message is "Check Projects" and while it's doing that, all Android projects are highlighted in red, because the Android resources aren't found. 具体的消息是“检查项目”,当它这样做时,所有Android项目都以红色突出显示,因为找不到Android资源。 Then, it proceeds with: 然后,它继续:

Loading data for Android 2.2 (100%) 正在加载Android 2.2的数据(100%)

This will stay for a couple of minutes. 这将保持几分钟。 Then it goes on to do the same with Android 3.1 and other SDK versions I have installed. 然后它继续对Android 3.1和我安装的其他SDK版本做同样的事情。 It basically hangs whenever the first autocompletion kicks in (eg after typing System. ) or when I access the Android preferences before it has loaded. 每当第一次自动完成时(例如,在键入System.之后)或者在加载之前访问Android首选项时,它基本上会挂起。

Here's the state of my Android SDK: 这是我的Android SDK的状态:

What I've already tried: 我已经尝试过的:

  • Reinstalling the Android SDK (via Homebrew), thus deleting /usr/local/Cellar/android-sdk completely. 重新安装Android SDK(通过Homebrew),从而完全删除/usr/local/Cellar/android-sdk

  • Reinstalling the AVD plugin (v.21) from scratch. 从头开始重新安装AVD插件(v.21)。

What can I do to find out about the source of these problems and get back to a nice and clean state? 我该怎么做才能找到这些问题的根源并回到一个干净整洁的状态?


#1楼

参考:https://stackoom.com/question/UB8N/Eclipse挂起在Android-SDK内容加载器上


#2楼

My solution: 我的解决方案

Install all the Docs in the sdk manager. 在sdk管理器中安装所有文档。


#3楼

It turns out this problem indeed occurs when your internet connection is flaky, slow, etc. 事实证明,当你的互联网连接片状,速度慢等时,确实会发生这个问题。

As soon as I got back to my normal internet connection, the content would load fine again, within less than a few seconds. 一旦我回到正常的互联网连接,内容将在不到几秒钟内再次加载。


#4楼

Go to your workspace directory \\workspace\\.metadata\\.plugins\\org.eclipse.core.resources\\.projects and delete all the projects in there. 转到工作区目录\\workspace\\.metadata\\.plugins\\org.eclipse.core.resources\\.projects并删除其中的所有项目。

Note: You are not going to lose your projects 注意:您不会丢失您的项目


#5楼

Same problem, stuck at 0%. 同样的问题,停留在0%。 Ran

/Applications/eclipse/eclipse -clean

and everything worked great again. 一切都很好。 Modify that path for linux boxes. 修改linux框的路径。

Update (from the remark from @Janusz ) 更新(来自@Janusz的评论)

For mac users with eclipse outside application directory your clean command will looks similar to: 对于在应用程序目录外使用eclipse的 mac用户,clean命令看起来类似于:

path/eclipse/Eclipse.app/Contents/MacOS/eclipse -clean 

#6楼

I know that this has been resolved but I thought I would share this link : 我知道这已经解决但我想我会分享这个链接

Solution One 解决方案一

Often times, this problem can be network related. 通常,这个问题可能与网络有关。 Check if your network is behind a proxy. 检查您的网络是否在代理服务器后面。 If so, you need to configure proxy on Eclipse. 如果是这样,您需要在Eclipse上配置代理。 For that, go to “Windows” -> “Preferences” -> “General” -> “Network Connections”, and fill in your proxy info. 为此,请转到“Windows” - >“首选项” - >“常规” - >“网络连接”,然后填写您的代理信息。 Restart Eclipse after that. 之后重启Eclipse。 Conversely, it's also possible that you have configured proxy on Eclipse before, but that you are no longer behind proxy. 相反,您之前也可能已经在Eclipse上配置了代理,但您不再支持代理。 Make sure to disable proxy then. 确保禁用代理。

Solution Two 解决方案二

Another solution is to clean up project-specific meta data directories which are stored under your workspace directory. 另一种解决方案是清理存储在工作空间目录下的特定于项目的元数据目录。

 $ cd workspace/.metadata/.plugins/org.eclipse.core.resources/.projects $ rm -rf * 

Restart Eclipse. 重启Eclipse。

Solution Three 解决方案三

Check if an adb process is running. 检查adb进程是否正在运行。 If so, kill the adb process, and restart Eclipse. 如果是这样,请终止adb进程,然后重新启动Eclipse。

Solution Four 解决方案四

  1. Try deleteing the contents of the cache folder located in user profile under .android\\cache 尝试删除位于.android\\cache下的用户配置文件中的缓存文件夹的内容
  2. Try deleteing the ddms.cfg located in user profile under .android 尝试删除位于.android下的用户配置文件中的ddms.cfg
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值