Eclipse 启动挂起,“Android SDK:解决错误标记”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22771679/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 06:25:43  来源:igfitidea点击:

Eclipse startup hang, "Android SDK: resolving error markers"

androideclipsegoogle-app-engine

提问by PSchuette

I am aware that other people have tried to resolve this issue but have thus far found a suitable answer.

我知道其他人已经尝试解决这个问题,但到目前为止已经找到了合适的答案。

The error is, on start up, eclipse gets hung up on "Android SDK: resolving error markers" furthermore, if I try to interact with it, it freezes completely and I am forced to force quit.

错误是,在启动时,eclipse 被挂在“Android SDK:解决错误标记”上,此外,如果我尝试与它交互,它会完全冻结,我被迫强制退出。

This is the progress dialog: Eclipse Progress Dialog

这是进度对话框: Eclipse 进度对话框

I find it odd that it needs to resolve the error markers multiple times but I assume this is just for each project in my workspace.

我发现它需要多次解决错误标记很奇怪,但我认为这仅适用于我工作区中的每个项目。

this is my eclipse.ini:

这是我的 eclipse.ini:

eclipse.ini

eclipse.ini

Other things to note being that all that currently exists within my workspace is an Android Application, an App-engine endpoint project for the before application, and 4 needed referenced libraries. All mentioned projects are open. Is this a matter of me overloading the IDE or perhaps there is some loop I threw it into? I find it hard to imagine that this is a unique circumstance.

其他需要注意的是,我的工作区中当前存在的所有内容是一个 Android 应用程序、一个用于前一个应用程序的 App-engine 端点项目以及 4 个需要的引用库。所有提到的项目都是开放的。这是我重载 IDE 的问题,还是我把它扔进了一些循环?我很难想象这是一种独特的情况。

UPDATE: When I delete the app engine endpoint project from the workspace and restart eclipse, it loads fine. When I bring it back in, all good. But when I restart from there, it goes into error loop again. I am convinced that I have a circular reference in there somewhere but I cant figure out where. Thanks for your help.

更新:当我从工作区中删除应用引擎端点项目并重新启动 eclipse 时,它​​加载正常。当我把它带回来时,一切都很好。但是当我从那里重新启动时,它再次进入错误循环。我确信我在某处有一个循环引用,但我不知道在哪里。谢谢你的帮助。

回答by DayDayHappy

This problem made me crazy until I found below, if I didn't post the answer, I am not a man! Hope this helps if you are also going crazy

这个问题让我抓狂,直到我在下面找到,如果我不发布答案,我就不是男人!如果你也发疯了,希望这会有所帮助

I found from Eclipse Stuck at "Android SDK: Resolving error markers":

我从Eclipse Stuck 在“Android SDK:解决错误标记”中找到

cd [my workspace folder]

cd .metadata

find . -name .markers -exec rm {} \;

eclipse -clean -refresh

if you are in win32

如果你在 win32

FOR /F "tokens=*" %%G IN ('DIR /B /AD /S .markers') DO RMDIR /S /Q "%%G"

回答by Ignacio Rubio

I solved the issue with this (from your eclipse folder):

我用这个解决了这个问题(从你的 eclipse 文件夹中):

eclipse -clean -refresh

I followed this url: http://tekhoow.blogspot.com.es/2013/06/eclipse-stuck-at-android-sdk-resolving.html(but the eclipse command was enough for me)

我跟着这个网址:http: //tekhoow.blogspot.com.es/2013/06/eclipse-stuck-at-android-sdk-resolving.html(但eclipse命令对我来说已经足够了)

There is also another stack question with the same topic and say the same: "Clean all projects in your workspace and restart Eclipse to solve this problem." How to Resolving error markers Eclipse Android SDK

还有另一个与相同主题的堆栈问题并说相同:“清理工作区中的所有项目并重新启动Eclipse以解决此问题。” 如何解决错误标记 Eclipse Android SDK

回答by M. Reza Nasirloo

After trying all suggested ways, the only way solved my problem was deleting this file:

在尝试了所有建议的方法后,解决我的问题的唯一方法是删除此文件:

/workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi

/workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi

Original answer

原答案

回答by Jesse Spalding

I was having the same problem, and found the solution by going running "eclipse.exe -clean -refresh" from the cmd prompt. The above solution includes other commands done in the .metadata folder which doesn't apply to all versions of Eclipse. I am using Eclipse IDE for Android Developers 23.0.2.1259578.

我遇到了同样的问题,并通过从 cmd 提示符运行“eclipse.exe -clean -refresh”找到了解决方案。上述解决方案包括在 .metadata 文件夹中完成的其他命令,这些命令不适用于所有版本的 Eclipse。我使用 Eclipse IDE for Android Developers 23.0.2.1259578。

回答by PSchuette

There is a very simple way of invoking the above answers on Mac OSX:

有一种非常简单的方法可以在 Mac OSX 上调用上述答案:

cd workspace

光盘工作区

rm ./.metadata/.plugins/org.eclipse.core.resources/.projects/*/.markers

rm ./.metadata/.plugins/org.eclipse.core.resources/.projects/*/.markers

(or)

(或者)

rm ./.metadata/.plugins/org.eclipse.core.resources/.projects/Project-Name/.markers

rm ./.metadata/.plugins/org.eclipse.core.resources/.projects/Project-Name/.markers

cd eclipse.app/Contents/MacOS

cd eclipse.app/Contents/MacOS

./eclipse -clean -remove

./eclipse -clean -remove

回答by selusi

Great topic!!

好话题!!

After reading all answers. I have found a simple solution and It work fine on windows 7.

阅读所有答案后。我找到了一个简单的解决方案,它在 Windows 7 上运行良好。

I created a file "eclipse_start.bat" with this simple command lines:

我用这个简单的命令行创建了一个文件“eclipse_start.bat”:

cd /d C:\eclipse (the directory where is the eclipse.exe file)
eclipse -clean -refresh
cmd

Every time i have to launch Eclipse simply I launch this file so the program start without problem.

每次我必须启动 Eclipse 时,我都会启动这个文件,这样程序就可以毫无问题地启动了。

I tried also another solution. I added this line in the file "eclipse.ini" before all other line

我也尝试了另一种解决方案。我在所有其他行之前在文件“eclipse.ini”中添加了这一行

-clean
-refresh

In this way I can launch directly Eclispe with the same result but in a more cleaned way.

通过这种方式,我可以直接启动 Eclispe,结果相同,但方式更简洁。

Thanks to everybody!

感谢大家!

回答by Ojonugwa Jude Ochalifu

This has happened to me before.There are errors in the libraries related to the Google App Engine project, what you need to do is close Eclipse, go to your workspace and move every other project not related to the Google App Engine project to another location on your computer, then start Eclipse and make sure you resolve all the issues with the backend project ,then copy the other projects back to your workspace.

我之前也遇到过这种情况。Google App Engine 项目相关的库中存在错误,您需要做的是 close Eclipse, go to your workspace and move every other project not related to the Google App Engine project to another location on your computer, then start Eclipse and make sure you resolve all the issues with the backend project ,then copy the other projects back to your workspace.

回答by PSchuette

figured it out a couple days ago and forgot to inform y'all.

前几天想通了,忘记通知大家了。

all I needed to do was save the projects to some other directory if you have not already. Delete it from your workspace and also delete the app engine endpoints project.

我需要做的就是将项目保存到其他目录(如果您还没有)。从您的工作区中删除它,同时删除应用引擎端点项目。

Re-import the android project and copy into workspace. set the java build path and everything else (if it says 'project master' control click -> team -> disable) everything should look fine. Then, delete all references to the app engine project, this means folders called 'endpoint-libs/libcontainers...'

重新导入android项目并复制到工作区。设置 java 构建路径和其他所有内容(如果它说“项目主”控制单击 -> 团队 -> 禁用)一切都应该看起来不错。然后,删除对应用引擎项目的所有引用,这意味着名为“endpoint-libs/libcontainers...”的文件夹

This will break your project everywhere you reference the data model

这将在您引用数据模型的任何地方破坏您的项目

Now, re-import the app engine project and make any necessary changes so that it doesn't have build errors (warnings may be OK).

现在,重新导入应用引擎项目并进行任何必要的更改,以便它没有构建错误(警告可能没问题)。

Control click -> generate cloud endpoint client library. The libraries in the original project will be replaced.

控制单击-> 生成云端点客户端库。原始项目中的库将被替换。

Not entirely sure what caused this but for the time being it has been working beautifully.

不完全确定是什么导致了这种情况,但目前它一直运行良好。

回答by heloisasim

I have a simply solution without code. Stop the process "resolving error markers" using the red button, then uncheck Build Automatically (Project -> Build Automatically), close Eclipse and open it again. Check again Build Automatically.

我有一个没有代码的简单解决方案。使用红色按钮停止“解决错误标记”过程,然后取消选中自动构建(项目 -> 自动构建),关闭 Eclipse 并再次打开它。再次检查自动构建。

Sometimes it happen again, then I do this same process. Boring, but it works.

有时它会再次发生,然后我会执行相同的过程。无聊,但它有效。

回答by Yo Mismo

Create a text document in the Eclipse installation folder Paste this command and update with your installation folder name

在 Eclipse 安装文件夹中创建一个文本文档粘贴此命令并使用您的安装文件夹名称进行更新

"C:\Folder where Eclipse is installed\eclipse\eclipse.exe" -clean -refresh

"C:\安装 Eclipse 的文件夹\eclipse\eclipse.exe" -clean -refresh

Rename to CleanEclipse.bat and run every time you have this issue Will save you a lot of time!

重命名为 CleanEclipse.bat 并在每次遇到此问题时运行 将为您节省大量时间!