Intellij IDEA 出现"Usage of API documented as @since 1.6+"的解决办法
2021-02-16 08:20
阅读:584
            
具体报错内容如下:
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
报错图:

看代码意思是,那个方法是自Java1.6开始的,但是,你的language level 才是5,级别不够,所以,就报错了。
根本的解决办法是在maven中设置编译级别
properties>
    java-version>1.7java-version>
properties>
plugins>
    plugin>
        groupId>org.apache.maven.pluginsgroupId>
        artifactId>maven-compiler-pluginartifactId>
        version>3.2version>
        configuration>
            source>${java-version}source>
            target>${java-version}target>
            encoding>UTF-8encoding>
        configuration>
    plugin>
plugins>
下一篇:window 安装 nvm
                    文章来自:搜素材网的编程语言模块,转载请注明文章出处。
文章标题:Intellij IDEA 出现"Usage of API documented as @since 1.6+"的解决办法
文章链接:http://soscw.com/index.php/essay/56013.html
            文章标题:Intellij IDEA 出现"Usage of API documented as @since 1.6+"的解决办法
文章链接:http://soscw.com/index.php/essay/56013.html
评论
亲,登录后才可以留言!