【问题标题】:IntelliJ: Kotlin error causes mouse flicker and errors in codeIntelliJ:Kotlin 错误导致鼠标闪烁和代码错误
【发布时间】:2016-06-09 20:12:39
【问题描述】:

我将 IntelliJ 15 与 Kotlin beta-1038 一起使用,并且在 eclipse 底部出现此错误。

Internal Error occurred while analyzing this expression:
java.util.ServiceConfigurationError: org.jetbrains.kotlin.resolve.ExternalOverridabilityCondition: Provider org.jetbrains.kotlin.load.java.ErasedOverridabilityCondition not found
    at java.util.ServiceLoader.fail(ServiceLoader.java:239)
    at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372)
    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
    at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
    at kotlin.CollectionsKt___CollectionsKt.toCollection(_Collections.kt:949)
    at kotlin.CollectionsKt.toCollection(Unknown Source)
    at kotlin.CollectionsKt___CollectionsKt.toArrayList(_Collections.kt:942)
    at kotlin.CollectionsKt.toArrayList(Unknown Source)
    at kotlin.CollectionsKt___CollectionsKt.toList(_Collections.kt:973)
    at kotlin.CollectionsKt.toList(Unknown Source)
    at org.jetbrains.kotlin.resolve.OverridingUtil.<clinit>(OverridingUtil.java:41)
    at org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedClassDescriptor$DeserializedClassMemberScope.generateFakeOverrides(DeserializedClassDescriptor.kt:216)
    at org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedClassDescriptor$DeserializedClassMemberScope.computeNonDeclaredFunctions(DeserializedClassDescriptor.kt:202)
    at org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedMemberScope.computeFunctions(DeserializedMemberScope.kt:77)
    at org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedMemberScope.access$computeFunctions(DeserializedMemberScope.kt:32)
    at org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedMemberScope$functions$1.invoke(DeserializedMemberScope.kt:50)
    at org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedMemberScope$functions$1.invoke(DeserializedMemberScope.kt:32)
    at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunction.invoke(LockBasedStorageManager.java:389)
    at org.j...

我接触的每个 Kotlin 文件都充满了错误,当我将鼠标悬停在任何代码上时,我的鼠标会闪烁,我会滞后。我也没有智能感知。

但是,我可以编译并运行该项目,并且我在 kotlin 文件中所做的更改将起作用。

【问题讨论】:

    标签: intellij-idea intellisense lag kotlin flicker


    【解决方案1】:

    IntelliJ IDEA 15.0.4 捆绑了 Kotlin 1.0 版本。您破坏了 Kotlin 安装,因为您遵循了 How to downgrade Kotlin in Intellij 15 给您的错误建议。要修复您的安装,您需要从原始安装程序重新安装 IntelliJ IDEA。

    【讨论】:

    • 正如我之前所说,较新版本的 Kotlin 与我的项目不兼容,有没有办法让这个版本与 intellij 一起工作?
    • 我知道这不是您问题的答案,但也许您应该考虑将您的项目移植到 Kotlin 1.0。使用 1.0 之前的 Beta 版语言似乎会给您带来越来越多的麻烦。
    • @CaseyB 我该怎么做?我是 IntelliJ、Gradle 和 Kotlin 的新手,你认为这很难吗?
    • 升级库非常简单,只需转到 Preferences > Plugins 并搜索 Kotlin。那里应该有一个更新按钮。至于使您的代码符合 1.0 而不是您现在使用的代码,这将取决于您的代码,我真的不能说没有看到它。我建议更新并查看问题所在。
    • 1.0.0-rc-1036 和最终的 1.0.0 版本之间几乎没有变化。很可能您需要做的唯一一件事就是将 build.gradle 中的 Kotlin 版本从 1.0.0-rc-1036 更改为 1.0.0。
    猜你喜欢
    • 1970-01-01
    • 2017-03-19
    • 2010-11-15
    • 1970-01-01
    • 2015-09-19
    • 1970-01-01
    • 1970-01-01
    • 2010-12-26
    • 1970-01-01
    相关资源
    最近更新 更多