当前位置: 动力学知识库 > 问答 > 编程问答 >

intellij idea - Cannot find Kotlin classes when compiling IntelliJBehave

问题描述:

I am trying to compile IntelliJBehave to add support for scala. When I compile, I get the following errors:

/home/hobbitProg/devWorkspace/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/psi/NavigableKotlinPsiAnnotation.kt

Error:(5, 22) Kotlin: Unresolved reference: kotlin

Error:(12, 21) Kotlin: Unresolved reference: JetElement

/home/hobbitProg/devWorkspace/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/psi/NavigableKotlinPsiElement.kt

Error:(6, 22) Kotlin: Unresolved reference: kotlin

Error:(13, 33) Kotlin: Unresolved reference: JetElement

Error:(22, 34) Kotlin: Unresolved reference: JetElement

/home/hobbitProg/devWorkspace/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/psi/NavigableKotlinPsiMethod.kt

Error:(5, 22) Kotlin: Unresolved reference: kotlin

Error:(12, 21) Kotlin: Unresolved reference: JetElement

/home/hobbitProg/devWorkspace/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/support/services/KotlinAnnotationsLoader.kt

Error:(8, 22) Kotlin: Unresolved reference: kotlin

Error:(9, 22) Kotlin: Unresolved reference: kotlin

Error:(10, 22) Kotlin: Unresolved reference: kotlin

Error:(29, 13) Kotlin: Unresolved reference: JetAnnotationsIndex

Error:(30, 35) Kotlin: Cannot infer a type for this parameter. Please specify it explicitly.

Error:(32, 73) Kotlin: Unresolved reference: JetFunction

Error:(34, 49) Kotlin: Unresolved reference: LightClassUtil

/home/hobbitProg/devWorkspace/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/support/services/KotlinPsiClassesLoader.kt

Error:(4, 22) Kotlin: Unresolved reference: kotlin

Error:(5, 22) Kotlin: Unresolved reference: kotlin

Error:(6, 22) Kotlin: Unresolved reference: kotlin

Error:(21, 58) Kotlin: Unresolved reference: JetFile

Error:(22, 17) Kotlin: Unresolved reference: declarations

Error:(23, 24) Kotlin: Unresolved reference: LightClassUtil

Error:(23, 51) Kotlin: Unresolved reference: it

Error:(23, 58) Kotlin: Unresolved reference: JetClass

I realize that the JetElement, JetAnnotationsIndex, LightClassUtil, and JetClass classes are not being found by the Kotlin compiler. Could someone please let me know where I can find the library that defines these classes?

网友答案:

The plugin was compiled against an old version of the Kotlin plugin. To compile the plugin, you need to add the Kotlin plugin to the classpath of your IntelliJ IDEA SDK and to update the code of IntelliJBehave so that it references Kotlin classes according to their current names (KtElement, KtAnnotationsIndex etc).

分享给朋友:
您可能感兴趣的文章:
随机阅读: