Android 用户操作正在等待“构建工作区”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11514987/
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 07:53:24  来源:igfitidea点击:

User Operation is waiting for "Building Workspace"

androideclipse

提问by Conrad

As the title mentioned, I have developed a simple NFC app in eclipse and I am trying to run it in the mobile device to debug my code. However, when I try to run it, this message came out, the problem even cannot launch. It said one operation left, but it seems like it has stopped. Have anyone met the similar problem before, or anyone know what is happening here?

正如标题所提到的,我在 eclipse 中开发了一个简单的 NFC 应用程序,我试图在移动设备中运行它来调试我的代码。但是,当我尝试运行它时,出现此消息,问题甚至无法启动。上面说还剩一个手术,但好像已经停止了。有没有人遇到过类似的问题,或者有人知道这里发生了什么?

The screen comes out when I run the program

当我运行程序时出现屏幕

采纳答案by jlego

I had exactly the same problem. For me helped adding '-clean' option at the first line of eclipse.ini file and restarting IDE. After adding this option eclipse clean all cached data in workspace each time it is started (that also mean it will be starting slower).

我遇到了完全相同的问题。对我来说,帮助在 eclipse.ini 文件的第一行添加“-clean”选项并重新启动 IDE。添加此选项后,eclipse 每次启动时都会清除工作区中的所有缓存数据(这也意味着它会启动得更慢)。

You can find more information about it here: How to repair hanging 'User Operation is waiting for “Building Workspace”' in eclipse

您可以在此处找到有关它的更多信息:如何在 Eclipse 中修复挂起的“用户操作正在等待“构建工作区””

回答by Mallox

For me the clean option didn't work and I didn't want to reset the workspace. Fortunately for me another solution worked:

对我来说,clean 选项不起作用,我不想重置工作区。幸运的是,另一个解决方案有效:

  1. Disable automatic builds (uncheck menu item Projects -> Build Automatically)
  2. Restart IDE (I had to kill it from command line)
  3. Close all projects
  4. Restart IDE (this time it should close without problems)
  5. Open projects that you need to work on (everything should be fine now)
  1. 禁用自动构建(取消选中菜单项 Projects -> Build Automatically)
  2. 重新启动 IDE(我不得不从命令行杀死它)
  3. 关闭所有项目
  4. 重新启动 IDE(这次它应该没有问题地关闭)
  5. 打开你需要处理的项目(现在一切都应该没问题)

Oh yeah, I had the clean option in the eclipse.ini the entire time. Not sure if that is necessary, but it might be good to try that option first anyways.

哦,是的,我一直在 eclipse.ini 中有干净的选项。不确定这是否有必要,但无论如何先尝试该选项可能会很好。

回答by Amzi

I had to disable the automatic build option from the Eclipse and restart it. This made it work for me.

我不得不从 Eclipse 中禁用自动构建选项并重新启动它。这使它对我有用。

回答by thangNguyen

This method worked for me:

这种方法对我有用:

  1. Go to menu 'Project' -> uncheck 'Build Automatically'.
  2. Force close Eclipse then reopen it.
  3. Delete the class files.
  4. Edit the source codes which caused the error, save, and rebuild the project ('Project' -> 'Build All').
  1. 转到菜单“项目”-> 取消选中“自动构建”。
  2. 强制关闭 Eclipse 然后重新打开它。
  3. 删除类文件。
  4. 编辑导致错误的源代码,保存并重建项目('Project' -> 'Build All')。

Hope this'll help!

希望这会有所帮助!

回答by David I.

It can also be an indication that the JDK setting is wrong in Eclipse. In my case, I was pointing to a specific directory on my work computer. The IT people upgraded the JDK and put it in a different directory so the old path was no longer valid. Eclipse did find a JRE in a parallel directory and was trying to use that.

这也可能表明 Eclipse 中的 JDK 设置有误。就我而言,我指向的是工作计算机上的特定目录。IT 人员升级了 JDK 并将其放在不同的目录中,因此旧路径不再有效。Eclipse 确实在并行目录中找到了一个 JRE,并试图使用它。

I fixed the JDK setting and it worked.

我修复了 JDK 设置并且它起作用了。

I didn't notice at first because I had "build automatically" turned on. Once I turned it off then tried to run a Maven build, then I saw an error message saying javac couldn't be found.

起初我没有注意到,因为我打开了“自动构建”。一旦我关闭它然后尝试运行 Maven 构建,然后我看到一条错误消息,说找不到 javac。

回答by zoro

I had the same problem: dying waiting for Project/clean. I have tried following this recommandations, "-clean" comman in eclipse.ini, modified the working environment, reinstall eclipse... After all, problem stayed still.

我有同样的问题:等待项目/清理而死。我已经尝试按照这个建议,eclipse.ini中的“-clean”命令,修改工作环境,重新安装eclipse......毕竟问题仍然存在。

Then finally, I ask my friend, then the solution was simple: "it might be crashed at your aapt file, change it with a good one"

最后,我问了我的朋友,然后解决方案很简单:“它可能在你的 aapt 文件中崩溃了,换一个好的”

Everything works fine now. Hope it helps.

现在一切正常。希望能帮助到你。

回答by miko

I got this solved by removing <workspace_folder>/.metadata/.lockfile.

我通过删除<workspace_folder>/.metadata/.lock文件解决了这个问题。

回答by Hasnaa Ibraheem

I had the same issue and I applied what the fellows had advised however it didn't work. I figured out that there were some folders under target-->classes directory that neither myself nor the IDE was able to clean/delete..
I restarted the machine then started the IDE and everything worked just fine.

我遇到了同样的问题,我应用了同事的建议,但没有用。我发现 target-->classes 目录下有一些文件夹,我自己和 IDE 都无法清理/删除..
我重新启动了机器,然后启动了 IDE,一切正常。

回答by Lova Chittumuri

Go to ProjectMenu Uncheckthe Build automaticallyand Restartthe Eclipse/STS IDE.

转到项目菜单取消选中自动构建重新启动Eclipse的/ STS IDE。

enter image description here

在此处输入图片说明

回答by Ravinder Payal

this can be due to installing another software with port setted equivalent to the port used by adb server

这可能是由于安装了另一个软件,其端口设置为与 adb 服务器使用的端口相同

adb hangs when trying to start or stop server

尝试启动或停止服务器时 adb 挂起