IntelliJ: Kotlin error causes mouse flicker and er

2019-09-19 13:58发布

问题:

I'm using IntelliJ 15 with Kotlin beta-1038, and I'm getting this error at the bottom of 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...

Every Kotlin file I touch becomes full of errors and my mouse will flicker and I'll lag when I hover over any of the code. I also don't have intellisense.

However, I can compile and run the project and my changes in the kotlin files will work.

回答1:

IntelliJ IDEA 15.0.4 bundles Kotlin 1.0 release. You broke your Kotlin installation because you followed the incorrect advice given to you at How to downgrade Kotlin in Intellij 15. To fix your installation, you need to reinstall IntelliJ IDEA from the original installer.