Resource is out of sync with the file system solution, resourcesync
Prompt:
When searching and deleting files in eclipse, an error dialog box is displayed. The error excerpt is as follows:
Resource is out of sync with the file system ......
Problem Analysis:
This problem occurs because files in eclipse are not synchronized. In eclipse, project files are automatically scanned and added by eclipse. If files in the project directory are modified externally but the automatic refresh function is disabled, the files are not synchronized,
This occurs when a file is searched or deleted.Resource is out of sync with the file systemProblem (other functions may also do the same ). In addition, files in the eclipse project that are not modified externally may also cause this problem.
Solution:
1) manually refresh. In the eclipse project directory, right-click refresh (or press F5 ).
2) Configure eclipse options:
A. When eclipse is started, refresh the workspace. Select window> preferences> general> startup and shutdown> refresh workspace on startup;
B. window-> preferences-> general-> workspace: Select refresh using native hooks or polling and refresh on access;
I personally recommend the first solution. When your project is relatively large, the loading speed will be slow if you use the second method. Automatically refresh the file after modification will lead to unexpected problems.