Intellij - Unable to use newer Java 8 classes - Error : “Usage of API documented as @since 1.6+..”

前端 未结 8 1172
我寻月下人不归
我寻月下人不归 2020-11-28 19:00

I\'m trying to use a java.lang.function.Function in my java 8 code base, but i keep getting the following error in Intellij.

Usage of API

8条回答
  •  孤独总比滥情好
    2020-11-28 19:29

    If you are using maven then Add below line in your configuration pom.xml file and then reimport or build it from maven.

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

    Else select java compiler and Language Level from below path.

    File > Project Structure > Project Settings > Modules > your Module name > Sources > Language Level > choose the one which you need.

    Change Language level from here :-

提交回复
热议问题