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为对应的版本。

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