解决方式:
step1
File->Project Structure -> project 菜单下,project SDK更改为1.8,然后project language level 更改为sdk default
这时候需要检查一下File->Project Structure -> Modules下模块的language level是否更改,未更改的话,点击下拉菜单更改一下
step2
File-setting->Bulid,Excution,Deployment->compiler->java Compiler中把相应的模块更改为jdk8
以上两步即可!