来自IntelliJ的Kotlin:NoClassDefFoundError:kotlin / jvm / internal / Intrinsics

时间:2017-02-27 21:43:06

标签: intellij-idea kotlin noclassdeffounderror classnotfoundexception intrinsics

自从我升级到Kotlin 1.1.0-rc-91后,我尝试从IntelliJ运行我的应用程序时收到此异常。

Exception in thread "main" java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
    at com.charlatano.Charlatano.main(Charlatano.kt)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 6 more

但是,当我构建应用程序的JAR并以此方式运行时,它确实有效。

整个应用都在这里托管:https://github.com/Jire/Charlatano

具体来说,我认为它与我的Gradle配置有关:https://github.com/Jire/Charlatano/blob/master/build.gradle

0 个答案:

没有答案