ViewModel in Kotlin: Unresolved Reference

前端 未结 7 1933
离开以前
离开以前 2021-01-07 17:24

I am trying to implement ViewModel in a 100% Kotlin app. Every piece of documentation I can find says I want to use this to get the ViewModel instance:

ViewM         


        
7条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-07 18:19

    In my case I was missing :

    implementation "androidx.fragment:fragment-ktx:1.1.0"
    

提交回复
热议问题