2
votes

I getting this error in my java project. I am not able to disable the kotlin plugin from IDE, and my kotlin plugin is latest updated.

3
invalidate cache and restart! - Pavneet_Singh
Not working tried - Dheeraj Singh Bhadoria
then try deleting gradle cache .../.gradle/caches and sync again - Pavneet_Singh
I am having the same issue. I don't think it's a bug with gradle cache. I have an almost identical copy of the same project which builds successfully. Also other projects build no problem. Tried deleting every cache in the project didn't work either. Removing Android Studio cache doesn't work too. - Yashar PourMohammad

3 Answers

0
votes

try to delete the global cache, that is C:\Users\<name>\.gradle\caches\ on windows.

0
votes

I had the same problem. Couldn't believe at first especially because it happened for only one of my projects. But turned out it was caused by a hard drive error: Cyclic Redundancy Check or CRC. Meaning your hard drive fails to read the package files containing these classes. Run check disk and then uninstall Android studio and all related files including [Windows drive]:/Users/[your user]/.gradle and .androidstudio*. Then download and install Android studio again. It should get it fixed.

-1
votes

NoClassDefFoundError:org/jetbrains/kotlin/annotation/plugin/ide/AnnotationBasedPluginModelBuilderService

I solved this issue by updating Kotlin plugin.

Go to:

Tools > Kotlin > Configure Kotlin Plugin Updates > Check for update

If you found a new version, please update it and restart your IDE.