Error in idea project startup: lambda expression is not supported in Java: – source 1.5

Error: lambda expressions are not supported in Java: – source 1.5

Reason: the JDK version used in this project is less than 1.8

The error information is as follows:

  The solution is as follows:

First, judge whether it is a POM problem: it will automatically change to 1.5 after modifying the environment

Solution: https://www.cnblogs.com/shining-feifan/p/15587151.html

Step 1: click “project structure” in the menu bar in the upper right corner

  Step 2: on the “project structure” page, select “SDKs”, select jdk8, and do not click the “+” button to add.

  Step 3: on the project structure page, select a module and modify the sources configuration

   Step 4: on the project structure page, select a module and modify the dependencies configuration

 

Similar Posts: