- Reason: JDK version is 1.6, Lambda expressions are not supported
- Solution:
SelectFile → Project Structure → Project
and modify Level to 8-Lambdas, type annotations etc.
- If the problem is not solved, then change the Modules to java 8
- If the problem is not resolved,
- File --> Settings -->Build, Execution, Deployment Compiler --> Java Compiler, change the version to Java 8: