+ 2

[Solved] Kotlin - Missing Language Features from Project

Hi, I use IntelliJ for creating Kotlin program. I just copied code from a project to another, same code, but says there is no equals(String?, Boolean) - which is by the way an extension method inside kotlin.text. Cannot figure out what is the problem! Different version of Kotlin? But it is a brand new project, however didn't find where can I set the Kotlin version. Simply there is this ext. method in project A, missing in project B. https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/equals.html

1st Mar 2018, 3:49 PM
Magyar Dávid
Magyar Dávid - avatar
1 Antwort
+ 2
[SOLUTION] Press Ctrl+Shift+A and search for Kotlin update. Update it. Be warned, sometimes it logs that the update is failed! No window shown about that! Then update again, optionally restart IntelliJ. Remove Kotlin Libraries from your project and add again. I played around these, and at a moment the Kotlin was in the right version to use and was able to import the until infix operator and the String?.equals(String?, Boolean) function too.
2nd Mar 2018, 2:10 PM
Magyar Dávid
Magyar Dávid - avatar