[英]How to purge false errors in eclipse?
From time to time in eclipse with ADT, I am getting errors that stick around even after I remove the offending code; 在使用ADT进行日食时,即使删除了有问题的代码,我也会遇到错误。 in fact, they stay even if I delete the entire content of the file, as per this screen shot:
事实上,即使我删除了文件的整个内容,它们仍然存在,按照此屏幕截图:
The error is Syntax error on token "}", delete this token
错误是
Syntax error on token "}", delete this token
Suffice to say, there is no such token. 可以说,没有这样的标记。
Obviously this is a bug, but what do I do? 显然这是一个错误,但我该怎么办? My code won't compile as a result.
我的代码不会被编译。
Most of the answers given didn't help or weren't the problem ( Clean
in Ran's comment worked, though...). 鉴于大多数没有帮助的答案或者是没有问题(
Clean
冉的评论工作,虽然...)。 The easiest fix was CTRL+1, then "Clear All Lint Markers". 最简单的修复是CTRL + 1,然后是“Clear All Lint Markers”。
Save the the file: Ctrl + S 保存文件:Ctrl + S.
In eclipse menu: Project - > Clean 在eclipse菜单中:Project - > Clean
对我来说,只需切断整条线并将其粘贴回去就可以解决问题。
You can delete the supposedly false compiler errors in the Problems view window , eg, 您可以在“ 问题”视图窗口中删除所谓的错误编译器错误,例如,
Confirm deletion even though javac
may recreate them: 即使
javac
可以重新创建它们,也要确认删除:
Any of the above solutions may work for you. 任何上述解决方案都可能适合您。
You are deleting larger content. 您正在删除更大的内容。 But some-where at Ending close of bundle which is "}", by mistake you are not deleting it.
但是在某些地方 - 在捆绑的结束时“}”,错误的你不会删除它。 So simply delete that "}" .
所以只需删除“}”即可 。 Then clean-up your project.
然后清理你的项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.