Usage of API documented as @since1.6+

后端 未结 5 761
北荒
北荒 2020-12-05 13:47

I keep getting this error even though I have a 1.6+ version (I have 1.8), and i\'m working with IntelliJ.

P.S. I have tried to update both, java jre and java jdk, di

5条回答
  •  旧巷少年郎
    2020-12-05 14:42

    If your project was imported via maven, you can fix the error by adding/editing the maven compiler plugin definition to look like this

    
        org.apache.maven.plugins
        maven-compiler-plugin
        3.8.0
        
          1.8
          1.8
        
    
    

    But if you're collaborating on an open source project, then making such a change will need approval first. If it's denied then you can do what 余智平 suggested. But keep in mind that the setting may be reverted if you some how reimport the project as InteliJ will read project configurations again from the POM.

提交回复
热议问题