Build failed for Gradle project. - FAILURE: Build failed with an exception.

Build failed for Gradle project. It can be happened due to presence of multiple java version in a single machine.


FAILURE: Build failed with an exception.

* What went wrong:
Could not create an instance of type eclipsePlugin_9x352wo7fjmqegjuu5xhgoasg.
> Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 364ms


This above error occurred due to unsupported java version. so i this case point to correct java version.

export JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home

Like here i am pointing to java11.




Post a Comment

Previous Post Next Post