Before several times encountered such a situation: in the school to write a good project, back to the bedroom with their own computer import project results appear a big exclamation. I have packaged the original project directly, and then, after extracting it, import the existing project into the working range with eclipse.
Where the red forks appear in the project are mainly data types that are not recognized:
The most typical error is "String cannot is resolved to a type"
After the problem went to Baidu a bit, and then the great God said that this is because the JDK version is not set up or set inconsistencies, that is, the version of Window->preferences->java->compiler and installed JRE inconsistent, I have jdk1.7 installed on my computer, and the most suitable compiler I have installed is 1.6, and it's a hassle to reinstall a jdk1.6.
Then found a better solution: Right-click on the project->properties->build path-> Select Libraries column, you can see the Red fork, This shows that the original project with the jdk1.6 version, and now the computer is installed on the jdk1.7, so the error will be displayed. Remove this error item, add LIBRARY->JRE System library->installed jres-> Select the installed jdk->finish that you want to add. The quicker way to do this is to select the error item directly->edit-> Select the installed jdk->finish that you want to add. It is found here that even if the compiler and installed JRE are inconsistent, there is a problem with the Eclipse project import error caused by the JDK version issue.
→ Portal: Importing Web projects into Eclipse common errors