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.
Change Java compiled version in
Project Structure(Ctrl + Shift + Alt + S) on windows in specific module, in my case it wasappmoduleAnd change Gradle JDK in
File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradleor (Ctrl + Alt + S) on windows