JAVA导入项目报错Description Resource PathLocation Type Java compiler level does not match the version of

eclipse 中导入java项目报错:
DescriptionResourcePathLocationType
Java compiler level does not match the version of the installed Java project facet.
错误原因:安装的jdk编译版本与导入项目的jdk编译版本不一致。
解决:
(1)系统用的是哪个版本的jdk?
cmd–java -version
JAVA导入项目报错Description Resource PathLocation Type Java compiler level does not match the version of
如上图可知,我用的是1.8版本的

(2)在eclipse中,依次找到windows–perferences–java–installed JRES–add
找到安装的时候jre所在的文件夹选择即可
JAVA导入项目报错Description Resource PathLocation Type Java compiler level does not match the version of
(3)依次找到
windows–perferences–java–compiler
将其设置成1.8版本
JAVA导入项目报错Description Resource PathLocation Type Java compiler level does not match the version of
(4)设置项目中对应的版本
依次找到项目–properties–java complier
把项目编译版本设为1.8
JAVA导入项目报错Description Resource PathLocation Type Java compiler level does not match the version of
(5)依次找到
项目–properties–project facets
将java版本设为1.8
JAVA导入项目报错Description Resource PathLocation Type Java compiler level does not match the version of

(6)刷新或重新导入项目即可