NoSuchMethodError for KtPsiFactory?

Hello! I'm working on my plugin for ktlint support.

I'm adding an action to create a comment to disable an error, but when I try to construct a KtPsiFactory instance, I get the following error:

java.lang.NoSuchMethodError: 'void org.jetbrains.kotlin.psi.KtPsiFactory.<init>(com.intellij.openapi.project.Project, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker)'

I see that KtPsiFactory is defined in the unzipped Kotlin plugin source, but I can't think of why it wouldn't be accessible at runtime. My build.gradle.kts is based on the plugin template, and the full file can be viewed here:


I've tried adding the following dependencies, and none helped resolve the class:

1 comment

Nick, sorry for the late reply – this post was somehow buried among the others. Did you manage to solve it?


Please sign in to leave a comment.