Caused by: java.lang.NoClassDefFoundError: org/jetbrains/kotlin/annotation/plugin/ide/AnnotationBasedPluginModelBuilderService

Viewed 4063

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 Answers

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.

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.

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

Related