解决IDEA 编译级别
Error:java: Target level '1.6' is incompatible with source level '1.7'. A target level '1.7' or better is required

打开之后发现有一个编译级别设置的不对
IDEA报错Target level '1.6' is incompatible with source level '1.7'

更改如下:
IDEA报错Target level '1.6' is incompatible with source level '1.7'

如果上面的方法还是不行的话,就建议你改一下pom文件中的maven插件编译级别,可以通过搜索所有的pom.xml,1.6这个关键词,就看出来了。

	<profiles>
		<profile>
			<id>jdk1.7</id>
			<activation>
				<activeByDefault>true</activeByDefault>
				<jdk>1.7</jdk>
			</activation>
			<properties>
				<maven.compiler.source>1.7</maven.compiler.source>
				<maven.compiler.target>1.7</maven.compiler.target>
				<maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
			</properties>
		</profile>
	</profiles>

相关文章:

  • 2021-11-05
  • 2022-12-23
  • 2022-12-23
  • 2021-09-28
  • 2021-08-29
  • 2022-12-23
  • 2021-11-21
猜你喜欢
  • 2021-05-28
  • 2022-12-23
  • 2021-08-03
  • 2021-07-10
相关资源
相似解决方案