Exception java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7

269 Views Asked by At

I'm having a problem with building Java project with Flutter module when compiling it. It shows the next problem:

Exception java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7

I've changed gradle version in ProjectName\gradle\wrapper\gradle-wrapper.properties and it didn't help.

1

There are 1 best solutions below

0
Nikita Shadkov On

Change Java compiled version in Project Structure (Ctrl + Shift + Alt + S) on windows in specific module, in my case it was app module

And change Gradle JDK in File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle or (Ctrl + Alt + S) on windows