Intellij Community 2018.3 seems to change project type from Java to Kotlin arbitratily
Answered
While I create a Maven multi-module project using JDK 11 when there is an error related to module exports and requires clauses IntelliJ suddenly shows this type of error.
It seems from that point onwards it becomes a Kotlin Project. I never create any Kotlin artifact.
Information:Kotlin: kotlinc-jvm 1.3.0 (JRE 11.0.1+13-LTS)
Information:12/3/2018 2:25 PM - Compilation completed with 1 error and 0 warnings in 3 s 396 ms
C:\Users\476458\IdeaProjects\GraphLayout\renderer\layout\src\main\java\module-info.java
Error:Kotlin: The Kotlin standard library is not found in the module graph. Please ensure you have the 'requires kotlin.stdlib' clause in your module definition
My observation when this happens is this.
1. There are module-info.java errors related to exports and requires clauses.
2. There were Maven cyclic dependency errors.
But when I fix these It doesn't try to start a Kotlin JVM. Everything is back to normal.
Thanks,
Mohan
Please sign in to leave a comment.
Please report at https://youtrack.jetbrains.com/issues/KT with a sample project to reproduce.
I solved the solution Build/Rebuild Project
reference Eakarahan https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000891860-Kotlin-Compile-Error
I came across the same bug but I cannot replicate it. It seems to be connected with IOExceptions and BufferedReader/BufferedWriter classes.
Nbapankui solution of "Build->Rebuild Project" solved the issue for me as well.
I also encounter the same issue..
solution of "Build->Rebuild Project" solved the issue.
Same here,
solved like all my predecessors on this thread
I think this issue is caused by copy pasting some code into a Java class that the compiler interprets as Kotlin. Intellij then immediately looks for a Kotlin library for the containing module/project and if it can't find one then this is the error you get.
That solved my problem too. Thanks a ton.