ClassNotFoundException in plugin development



A few days ago , I upgraded the IntelliJ IDEA to 2020.1(Build #IC-201.6668.121, built on April 8, 2020) , then a plugin i developed in 2019 didn't work.

And the error like this 


ERROR - llij.ide.plugins.PluginManager - com/intellij/psi/impl/java/stubs/index/JavaAnnotationIndex
java.lang.NoClassDefFoundError: com/intellij/psi/impl/java/stubs/index/JavaAnnotationIndex


I'm sure I can find JavaAnnotationIndex in the classpath, so what's happening...


here is my debug environment:

IntelliJ IDEA 2020.1 (Community Edition)
Build #IC-201.6668.121, built on April 8, 2020
Runtime version: 1.8.0_242-b08 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.4


Thans for help :)

Comment actions Permalink

Please review the Plugin Compatibility documentation page, Notes about Module and Plugin Dependency section.

Make sure that you have set proper dependencies to the java both in plugin.xml and Gradle configuration files.

Comment actions Permalink

Thanks a lot. That's solve my problem.


see  , Notes about Module and Plugin Dependency


Add  <depends></depends>  into plugin.xml and then it works

Do notice  <idea-version/>

Comment actions Permalink

i hava problem same to you,. 

thanks ;


Please sign in to leave a comment.