无法访问"kotlin.String"的超类型的"java.io.Serializable".检查您的模块类路径是否缺少或冲突的依赖项 [英] Cannot access 'java.io.Serializable' which is a supertype of 'kotlin.String'. Check your module classpath for missing or conflicting dependencies
本文介绍了无法访问"kotlin.String"的超类型的"java.io.Serializable".检查您的模块类路径是否缺少或冲突的依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Eclipse中有一个新的Kotlin项目(我安装了kotlin插件). 但是这段代码:
I have a new Kotlin project in Eclipse (I installed the kotlin plugin). However this code:
val a: Int = 10000
println("Your Int Value is "+a);
导致此错误:
ERROR: Cannot access 'java.io.Serializable' which is a supertype of 'kotlin.String'. Check your module classpath for missing or conflicting dependencies.
此错误的根源是什么?我该如何解决?
What is the source of this error? How can I fix it?
我看过关于stackoverflow的其他文章,但他们都谈论的是intellij,而不是Eclipse.
推荐答案
在eclipse中使用kotlin时出现此错误.在我的系统中,以前未安装JDK.我在PC上安装了JDK 15,并在eclipse中的kotlin插件设置中设置了路径(路径:Window->首选项-> Kotlin->编译器-> JDK Home)
I got this error while using kotlin in eclipse. In my system, JDK was not installed previously. I installed JDK 15 in the PC and set the path in kotlin plugin settings in eclipse (path: Window -> preferences -> Kotlin -> Compiler -> JDK Home)
这篇关于无法访问"kotlin.String"的超类型的"java.io.Serializable".检查您的模块类路径是否缺少或冲突的依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文