Java compiler level does not match the version of the installed Java project facet.

背景


  如题,新建了一个Java Web 项目,出现了Faceted Project Problem 错误,详细信息如下:

Java compiler level does not match the version of the installed Java project facet.

  大意为 Java compiler 和 所建项目的版本不匹配,那么有两种方式使其匹配:

  • 修改Java complier 使用的JDK版本

  • 修改项目使用的JDK版本

解决方案


  • 右击项目选择Properties(或者 alt + enter),查看Project Facets 中 Java 版本:


Java compiler level does not match the version of the installed Java project facet.

  • 查看Java Compiler 使用 JDK版本


Java compiler level does not match the version of the installed Java project facet.

  • 将两者修改为相同版本即可。