好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

解决Eclipse/STS中出现Resource is out of sync with the f

the error simply says, [you've made changes in files in your workspace from outside eclipse]. 

意思就是:你已经在你的工作空间更新了文件,但是eclipse并没有,所以出现了这个异常。

分析:

有时候因为时间紧迫的原因,所以就没去管它,今天再次遇到它,实在看着不爽,所以想了办法解决此问题!

这个问题是由于 eclipse 中文件不同步引起的。在eclipse中,工程文件是由eclipse自动扫描添加的,如果在外部修改了工程目录中的文件但又关闭了自动刷新功能,则会引起文件不同步,从而搜索时出现resource is out of sync with the file system问题(其它功能可能也会如此)。此外,在外部没有修改eclipse工程中的文件也有可能引起该问题。

解决方案:

the best way would be to let eclipse automatically handle any external changes in file system. so that when you compile the code it never gives the error [resource is out of sync with the filesystem].

意思就是:最好的方法就是在你的eclipse/sts 设定一下,当文件改变时自动刷新,这样你就永远不用担心编译代码时会出现这个异常了。

具体的方案有两个:

1、直接右键你的项目,进行 refresh 刷新下

2、选择 eclipse 的  window -> preferences -> general -> workspace   ,勾选以下两个按钮(问题完美解决):

refresh automatically refresh using native hooks or pooling

总结

以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,谢谢大家对的支持。如果你想了解更多相关内容请查看下面相关链接

原文链接:https://blog.csdn.net/moneyshi/article/details/60576489

查看更多关于解决Eclipse/STS中出现Resource is out of sync with the f的详细内容...

  阅读:14次