解决:eclipse删除工程会弹出一个对话框提示“[project_name]”contains resources that are not in sync with"[workspace_name...xx..xx..xx]"

提示“[project_name]”contains resources that are not in sync with"[workspace_name...xx..xx..xx]"

尝试过如下方法:

1.刷新工程目录。删除无用

2.关闭工程重新打开。删除无用

3.clean,重新编译刷新。删除无用

分析原因:

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

解决方案(一劳永逸):

  window—>preferences—>general—>startup and shutdown—>勾选选项:refresh workspace on startup;
    window—>preferences—>general—>workspace中:勾选选项:refresh using native hooks or polling和refresh on access;

原文地址:https://www.cnblogs.com/zuiaijiapei/p/8066780.html