'Error when using kotlin DSL within gradle

I got this error when switching from groovy to kotlin script.

Cannot access 'java.lang.Object' which is a supertype of 'org.gradle.kotlin.dsl.support.delegates.SettingsDelegate'. Check your module classpath for missing or conflicting dependencies

I use Android Studio Chipmunk Canary 6.

I tried to clean projet/cache but I got always the same error.

Update:

Solved by using OpenJDK 11



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source