您的位置:首页 > 其它

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

2016-02-19 17:38 295 查看
解决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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: