When I wanted to build Gradle, I got the following error.
could you please help me?
Thanks a lot.
java.lang.NoClassDefFoundError: org/gradle/api/internal/plugins/DefaultConvention at org.jetbrains.plugins.gradle.tooling.builder.ProjectExtensionsDataBuilderImpl.buildAll(ProjectExtensionsDataBuilderImpl.groovy:50) ... 122 more
My Gradle latest version is 6.0.1.
Also, I posted to Github. you can find full detail of error and my Gradle code at there; https://github.com/gradle/gradle/issues/11769
lang. NoClassDefFoundError, which means the Class Loader file responsible for dynamically loading classes can not find the . class file. So to remove this error, you should set your classpath to the location where your Class Loader is present.
In the command prompt, enter Gradle -version. It will display the current version of Gradle just installed on the screen.
It looks like one of your plugins (a jetbrains plugin of some sort) is not compatible with Gradle 6. I'm guessing you could fix the issue by either
It seems that the jetbrains plugin is referencing a Gradle class in an "internal" package. These classes are not part of the public API and can change (or be removed) between Gradle versions without notice, hence the NoClassDefFoundError. Ideally plugins should only reference the public API
For my Idea 2018.2 helped not to use built-in gradle wrapper, but to install gradle 5.6.4 (which has that org/gradle/api/internal/plugins/DefaultConvention) and specify home directory of that gradle when importing project to Idea.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With