【发布时间】:2021-07-06 13:33:41
【问题描述】:
我在 Eclipse 中有一个新的 Kotlin 项目(我安装了 kotlin 插件)。 但是这段代码:
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.
这个错误的根源是什么?我该如何解决?
我看过 stackoverflow 上的其他帖子,但他们都在谈论 intellij 而不是 Eclipse。
【问题讨论】:
-
可能你的项目结构没有正确指定sdk,进入file->project structure->edit sdk