1. 程式人生 > >java "lambda expressions not supported at this language level"

java "lambda expressions not supported at this language level"

1.修改project的JDK版本

File -> Project Structure -> Project,將Project Language Level設定為8.0 - Lambdas, type annotations etc.這一項。 
這裡寫圖片描述

2.修改module的JDK版本

將Project選項裡的jdk版本修改以後還不夠,還需要將對應module版本也修改正確。File -> Project Structure -> Modules裡,將Language Level也設定為8.0 - Lambdas, type annotations etc.這一項。 
這裡寫圖片描述

將以上兩項都修改完畢以後,就OK了。