When we study and work, sometimes when we import others' projects to our own development tools, there will always be strange and strange errors,
The code and classes in the project are correct, but there is a Red Cross in the project folder. Today I will tell you about such errors.
The incorrect solution causes the project to report this exception and shows it to everyone step by step. I hope you will encounter this kind of problem in the future.
Solution
Error example:
We can see that there are no errors except the project file, but the Console does not tell us how to solve the problem? It's actually very simple. Let's take a look at my demo:
Open the red box option, which is the main reason why the import project has some strange errors. It will be okay if it is broken one by one ~
The following describes how to solve an error:
Error example:
There are 2 errors and 41 warning examples. We can solve the error and ignore the warning. The first error prompt of the error is as follows:
Target runtime Apache Tomcat v7.0 is not defined. The target running Apache Tomcat 7.0 is not defined.
It indicates that the new project we imported has a problem with the local version. We only need to modify the configuration code and then OK:
Configuration code:
<?xml version="1.0" encoding="UTF-8"?><faceted-project> <runtime name="Apache Tomcat v7.0"/> <fixed facet="wst.jsdt.web"/> <fixed facet="jst.web"/> <fixed facet="java"/> <installed facet="java" version="1.7"/> <installed facet="jst.web" version="2.5"/> <installed facet="wst.jsdt.web" version="1.0"/></faceted-project>
Configuration file directory: Workspace ---> project name --->. settings ---> org. Eclipse. WST. Common. Project. facet. Core
Delete this sentence and save it as OK: <runtime name = "Apache Tomcat v7.0"/>
After solution:
In this way, only one error is left. If there is an error, check it in problems and solve it one by one ~
Question about importing a new project-the project file is incorrect, but the sub-file is correct.