成功解決idea中:Error:java: Compilation failed: internal java compiler error

Information:java: javacTask: 源發行版 8 需要目標發行版 1.8
Information:java: Errors occurred while compiling module 'neu-crawler'
Information:javac 1.8.0_181 was used to compile java sources
Information:Module "neu-crawler" was fully rebuilt due to project configuration/dependencies changes
Information:2020/6/22 9:58 - Build completed with 1 error and 0 warnings in 2 s 987 ms
Error:java: Compilation failed: internal java compiler error

在這裏插入圖片描述解決一:如果是maven工程,pom.xml添加如下內容(由於maven默認編譯版本是1.5):

 <properties>
        <source>1.8</source>
        <target>1.8</target>
    </properties>

添加位置如下:
在這裏插入圖片描述解決二:
在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章