idea 提示Information:javac 1.8.0_251 was used to compile java sources错误
把下面四个地方的版本都改成一样的
- File -> Project Structure -> Project Settings
- File -> Project Structure -> Module Settings -> Tab: Sources: Language Level
- File -> Project Structure -> Module Settings -> Tab: Dependencies: Module SDK
- File -> Settings -> Compiler -> Java Compiler -> Target bytecode version
图片里的版本是9,具体要根据自己的Java版本更改