【转】eclipse 错误信息 "File Search" has encounter a problem 解决

在eclipse中使用搜索功能,发生错误:

"File Search" has encounter a problem

仔细看了一下自动跳出的错误日志(Error Log),发现:

.......Resource is out of sync with the file system

原因:eclipse中的文件和workspace中文件不一致。(自己在workspace中用改了某个文件,即在eclipse工程之外的地方修改了源文件但是没有刷新)

解决方法:

方法1  在工程目录右键 Refresh

方法2  设置eclipse自动刷新(Window->Preferences->General->Workspace,选中Refresh automatically)

注:推荐使用方法1,方法2设置为自动刷新在工程比较大时代价有点大。

备注:adt中对应的的是(Window->Preferences->General->Workspace,选中Refresh using native hook or polling,Refresh on access)

from:http://blog.csdn.net/lhooouuu/article/details/7220528

原文地址:https://www.cnblogs.com/xuan52rock/p/5405382.html