Android Eclipse Hanging

对着背影说爱祢 提交于 2019-12-11 06:36:32

问题


I'm trying to get the ADT working in Eclipse, but I'm getting random hangs where eclipse just locks for no apparent reason, usually requiring a 'killall java' to properly clean it out of the memory.

I'm on Ubuntu 10.4 (64bit) Here's the details of my eclipse/android install:

eclipse Version: 3.5.2 Build id: M20100211-1343 Android Development Tools 0.9.8.v201008281755-53891 com.android.ide.eclipse.adt.feature.group Android DDMS 0.9.8.v201008281755-53891 com.android.ide.eclipse.ddms.feature.group

Here's the output from java -version : java version "1.6.0_20" Java(TM) SE Runtime Environment (build 1.6.0_20-b02) Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

I often don't get anything in the workspace logs, but here's an example of what appeared after Eclipse hung just now : !ENTRY org.eclipse.core.resources 8 2 2010-09-21 10:22:27.407 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources". !STACK 1 org.eclipse.core.runtime.CoreException: Project target not resolved yet. at com.android.ide.eclipse.adt.internal.build.BaseBuilder.stopBuild(Unknown Source) at com.android.ide.eclipse.adt.internal.build.BaseBuilder.abortOnBadSetup(Unknown Source) at com.android.ide.eclipse.adt.internal.build.PreCompilerBuilder.build(Unknown Source) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) !SUBENTRY 1 com.android.ide.eclipse.adt 8 0 2010-09-21 10:22:27.407 !MESSAGE Project target not resolved yet. !SUBENTRY 1 com.android.ide.eclipse.adt 8 0 2010-09-21 10:22:27.407 !MESSAGE Project target not resolved yet.

There were two of these entries - identical except for the timestamps.

I've tried just about every version of eclipse I can download, I've tried tying adt to sdk 1.6 r1, r2 and r3.

Anyone got any ideas? I'm at my wits end here. Eclipse is fairly solid for me using other plugins - C/C++, PyDev, PHP, Web stuff all work fine, but as soon as I try using the android plugin I start hanging. I've disabled code completion, in case it was that, but nope, whatever I seem to do, I get a couple of lines typed then everything goes grey.


回答1:


I prefer one eclipse installation for each programming language/language pack. Java + Android, Php + Web (HTML, JS...), Python... Maybe ADT isn't really compatible to one of your installed plugins. Try to use a separate eclipse installation/instance




回答2:


I've had this happen due to a corrupt Eclipse workbench. In particular, I've seen Eclipse hang while loading com.android.ide.eclipse.adt configuration.

First, I tried deleting com.android.ide.eclipse.adt from my workspace/.metadata/.plugins, but that did not do the trick.

However, deleting org.eclipse.ui.workbench from workspace/.metadata/.plugins seems to have done the trick.

Seems like the workbench configuration is getting corrupted somehow. So, try this guys:

rm /path_to_workspaces/workspace/.metadata/.plugins/org.eclipse.ui.workbench -fr

Seems to have fixed the problem for me now, and I believe this was the same solution I came up with when I had the same problem 2 years ago ( but just now found this question on SO)




回答3:


Recently this problem keeps cropping up too. I usually solve it by

1. Renaming org.eclipse.core.resources(in your *currently active workspace folder*/.metadata/plugins folder)  to something like org.eclipse.core.resources.old
2. Kill eclipse task if it is still hung in memory
3. Start eclipse, it should start fine and create org.eclipse.core.resources again
4. Close eclipse
5. Delete the newly created org.eclipse.core.resources folder and rename org.eclipse.core.resources.old to org.eclipse.core.resources
6. Start eclipse again.

This has worked for me



来源:https://stackoverflow.com/questions/3759092/android-eclipse-hanging

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!