Unable to use listOf(), hashMapOf(), mutableListOf() and other function in Kotlin

Viewed 700

I am getting below error when I am trying to use listOf(), hashMapOf(), mutableListOf() and other function in Kotlin.

Sentence: var moreBooks = hashMapOf<String, String>("Wilhem Tell" to "Schiller")

Error: Unresolved reference: hashMapOf

I have tired Invalidate Cache/Restart, still not working. Earlier this used to work.

Please help

0 Answers
Related