Error:BUG! exception in phase 'class generation' in source unit '_BuildScript_' unsupported Target MODULE

Michał Szewczyk picture Michał Szewczyk · Aug 26, 2017 · Viewed 12.7k times · Source

I'm trying to create a new Java 9 project using gradle but right after project creation I received error from gradle:

Error:BUG! exception in phase 'class generation' in source unit '_BuildScript_' unsupported Target MODULE

Java version: 9 (build 9+178)
Gradle version: 4.1-rc-2

According to this article those java/gradle versions should be compatible.
How can I solve this problem?

Any help highly appreciated.

Answer

kamaz picture kamaz · Aug 30, 2017

I have solved it by downgrading Gradle JVM to 8. It is not perfect but keeps you going while jdk9 and gradle and intellij stabilises.

Intellij View