Scenario: The item appears with a red exclamation mark
Workaround:
Right-click on the project to select Build Path→configure build Path
After clicking on the Eclipse Project's Configure build path, in the pop-up window, find the Libraries tab, and you can see that some jar packages are red forks, which is the jar package that cannot find the corresponding file. This eclipse project is preceded by a red exclamation mark, a red exclamation point before the Eclipse project, a red exclamation point in front of the Eclipse project, and an item with a red exclamation mark in front of the Eclipse project, possibly because the item was imported externally or because some files were deleted. Causes a red exclamation mark, a red exclamation point, and a red exclamation mark. Locate the jar packages that are not in these eclipse projects and modify them.
My reason for the error is not choosing the right JDK, clicking on the wrong place to edit it, and then selecting the current JDK.
Eclipse Project Red exclamation mark Solution