Error:java: Compilation failed: internal java compiler error

IntelliJ IDEA编译报错:

Information:java: javacTask: 源发行版 1.8 需要目标发行版 1.8
Information:java: Errors occurred while compiling module 'demo'
Information:javac 1.8.0_40 was used to compile java sources
Information:2016/01/1 11:08 - Compilation completed with 1 error and 0 warnings in 1s 176ms
Error:java: Compilation failed: internal java compiler error

解决方法:

菜单

IntellJ IDEA > Perferences > Build, Execution, Deployment > Compiler > Java Compiler

找到表头Target bytecode version设置1.8