use -source 7 or higher

后端 未结 7 1465
既然无缘
既然无缘 2020-12-28 12:15

While trying to build a project using intelliJ Ultimate 12 I am getting these errors

use -source or higher to enable diamond operator
use -source 7 or higher         


        
7条回答
  •  误落风尘
    2020-12-28 12:59

    In addition to the accepted answer, you may also need to change the language level under Project Structure > Modules > Sources tab.

    I also needed to change the java compiler being used at the IDE level under IntelliJ IDEA > Preference > Compiler > Java Compiler to 1.7 from 1.6. The exact location of the setting will vary based on your OS and version of IntelliJ IDEA.

提交回复
热议问题