Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot access 'java.io.Serializable' which is a supertype of 'kotlin.String'. Check your module classpath for missing or conflicting dependencies

Tags:

eclipse

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);

causes this error:

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?

I have seen the other posts on stackoverflow but they all talk about intellij and not Eclipse.

like image 403
Medou me Avatar asked Oct 25 '20 19:10

Medou me


1 Answers

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)

like image 119
Hari Haran Swamy Avatar answered Oct 05 '22 07:10

Hari Haran Swamy