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>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM