kotlinintellij-ideaviewmodeljetbrains-compose

How to add ViewModel implementation in build.gradle.kts for IntelliJ IDEA project?


Android Studio as default has access to ViewModel class import androidx.lifecycle.ViewModel. How can I use this ViewModel into IntelliJ IDEA Kotlin desktop project (compose for desktop). developer.android.com provide guide how to add the dependices just for Android Studio project.


Solution

  • That class is android specific so can't be used for Compose for Desktop.