Android Studio Unresolved Reference: List, arrayListOf, setOf

852 Views Asked by At

Android Studio Arctic Fox | 2020.3.1 | Patch 2 Kotlin Plugin 1.5.31

Try to:

  1. Sync Gradle
  2. Invalidate cache and restart multiple times
  3. Remove .idea and ./gradle folders
  4. Re-install Android Studio
  5. Re-import Project

No result. Anyway "Unresolved Reference: List, arrayListOf, setOf"

Does anyone know what can I do (reinstall os, buy new PC...or I don't know) to finally just start to work on project?

1

There are 1 best solutions below

0
On

Your Intellij IDEA plugin and the Kotlin runtime/compiler that you use in the project need to match. For example if IDE plugin is Beta 1, but your Gradle/Maven project using M12, you'll have issues exactly as you described. So check that everything lines up.

If you still have issues, with some older plugins you need to clear the caches in Intellij IDEA (file menu, Clear Caches and Restart, select option to restart).