Update if you see this bad thing, here's how to fix it authored by Tommy Prusak's avatar Tommy Prusak
# Linkage Error/ Grade using wrong JVM
If you notice when running a Gradle task in IntelliJ that you get a Linkage Error or Gradle is trying to use a different JVM than expected, you need to change your Gradle JVM settings. For some reason, Gradle doesn't default to the project JDK. To change this setting, navigate to your IntelliJ settings, then follow "Build,Execution,Deployment"->"Build Tools"->"Gradle" and you will find a "Gradle JVM:" setting. Change it to the same as set in your project and you should be good to go.
\ No newline at end of file
If you notice when running a Gradle task in IntelliJ that you get a Linkage Error or Gradle is trying to use a different JVM than expected, you need to change your Gradle JVM setting. For some reason, Gradle doesn't default to the project JDK. To change this setting, navigate to your IntelliJ settings, then follow "Build,Execution,Deployment"->"Build Tools"->"Gradle" and you will find a "Gradle JVM:" setting. Change it to the same as set in your project and you should be good to go.
\ No newline at end of file