一、导入工程后,工程名出现红色感叹号,导致这种原因是工程本身的JRE System Library、Server Runtime与当前Eclipse中的运行环境不匹配。
1、右键点击【工程名】 → 【Properties】→ 【Java Build Path】→ 【Libraries】进行更新。
二、红叉
【windows】 → 【Show View】 →【 Other】 → 搜索框输入Problems → 选中Problems视图
如果出现:Target runtime Apache Tomcat v7.0 is not defined错误
解决:【工程名】 → 【Properties】→ 【Targeted Runtimes】→ tomcat7.0的去掉对勾,tomcat8.0的打对勾。→ 【Apply】→ 【OK】