Intellij Error:usage of api documented as @since 1.6+

Intellij Error:usage of api documented as @since 1.5+

错误场景:

开发工具:Intellij

在使用最新的Java8库的时候(我用的java.util.Scanner ),在调用该方法的地方会有错误提示:

Usage of API documented as @since 1.5+ This inspection finds all usages of methods that have @since tag in their documentation. This may be useful when development is performed under newer SDK version as the target platform for production

问题解决:

    查阅资料发现这可能是其他项目的设置影响了编译器的等级。当编译器发现源代码和目标Java版本与设置的编译版本不同时,便会报这个错误。

    要解决该问题,需作如下配置:Flie -> Project Structure -> Project Settings -> Modules -> "Your Module Name" -> Sources ->Language Level ,然后将其更改为所需级别,即8或"项目默认语言级别"。

你可能感兴趣的:(Intellij Error:usage of api documented as @since 1.6+)