Issue
I recently installed Intellj Idea Community Edition for learning Kotlin: since I'm a Beginner I write some basic code which is as follows:
fun main() {
val x = readln().toString();
println(x);
}
I don't know if there are some spelling mistakes, and yeah I hit the run button to let the build process start during the compilation, the build output showed this message:
Kotlin: Cannot access 'java.io.Serializable' which is a supertype of 'kotlin.String'. Check your module classpath for missing or conflicting dependencies[enter image description here]
This is my project Structure modules snapshot:
and this is my project libraries: and my project setting :
I'm expecting to get this problem solved thanks in advance
Solution
ok, I think you have set java development Kit for you project so that the IDE can access all of the classes and tools that are needed to run your project correctly.
simply walk through these steps: File > Project Structure > Project Setting > Project > SDK > Edit button > here you have to locate your JDK main folder
Answered By - Bilal Bilal
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.