Intellij Idea中maven項目代碼報錯:Usage of API documented as @since 1.8+

如題,當使用intellij idea開發maven項目時,代碼有時報錯爲:Usage of API documented as @since 1.8+ ,此時需要指定模塊的Language Level.

步驟:

File --> Project Structure --> Project Settings --> Modules 

選擇對應的module,設置source對應的Language level 爲報錯提示對應的版本,此處我的顯示需要api支持1.8+,所以,設置級別爲8 - Lambdas, type annotation etc.應用後即可解決問題。

再操作:Settings --> Build,Extension,Deployment --> Compile --> Java Compile 設置對應module的Target bytecode version爲對應的版本。

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