在运行的时候常常出现如下错误:

Error: java: Compliance level '1.6' is incompatible with target level '1.8'. A compliance level '1.8' or better is required

 

解决办法如下:

1. 点击File标签里的Settings, 选择Build,Execution,Deployment->Compiler->Java Compiler,将其中的其中的版本改成1.8;

【IDEA】Error: java: Compliance level '1.6' is incompatible with target level '1.8'. A compliance level '1.8' or better is required解决办法

2. 点击File标签里的Project Structure,选择Project Settings->Modules,选择1.8版本对应的language level

【IDEA】Error: java: Compliance level '1.6' is incompatible with target level '1.8'. A compliance level '1.8' or better is required解决办法

完成以上两步后,再运行时,便不再出现版本错误。

 

相关文章:

  • 2021-05-08
  • 2021-07-08
  • 2022-12-23
  • 2021-10-01
  • 2021-08-17
  • 2021-06-20
  • 2022-12-23
猜你喜欢
  • 2021-05-28
  • 2021-07-13
  • 2021-06-27
相关资源
相似解决方案