Unresolved reference problem

adapter cannot be recognized

I miss the imports from your code.
It should include smth like kotlinx.android.synthetic.main.activity_main.*

https://kotlinlang.org/docs/tutorials/android-plugin.html

1 Like