Fork me on GitHub

IDEA报错Target level '1.6' is incompatible with source level '1.7'

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

打开之后发现有一个编译级别设置的不对

更改如下:

如果上面的方法还是不行的话,就建议你改一下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>
posted @ 2016-02-19 17:38  _落雨  阅读(7055)  评论(0编辑  收藏  举报