org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script7.groovy: 1: unable to resolve class
If you using android studio and got this error then I solved it changing the Gradle version of the project to the newest version 6.2.1 on the project structure options.
Do you have the grail and groovy plugin installed? If so try uninstalling this plugin. I had the same error message and uninstalling the plugin, restart IDE worked for me.