Morten Minke
06/27/2024, 6:16 PMviewModel {..}
was not available. If you search for these terms you get all kinds of pages and this page https://developer.android.com/jetpack/androidx/releases/lifecycle#2.8.0 looked promising. However the gradle dependencies did not work for me. (Damn enter published my message too soon!). Today I finally got it working but still I am confused. The solution for me was two wrong dependecies apparently. Changing:
lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "lifecycleViewModel" }
lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycleViewModel" }
into
lifecycle-runtime-compose = { module = "org.jetbrains.androidx.lifecycle:lifecycle-runtime-compose", version.ref = "lifecycleViewModel" }
lifecycle-viewmodel-compose = { module = "org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycleViewModel" }
Both dependency definitions are valid but apparently different. Can someone explain? It would also be nice if this is documented somewhere for absolute beginners in the KMP world to get properly started (or point me to documentation which I could not find anywhere 😄 )
Hopefully this also helps others.Morten Minke
06/30/2024, 11:17 AMIvan Matkov
07/01/2024, 6:52 AMMorten Minke
07/01/2024, 7:57 PMIvan Matkov
07/01/2024, 7:58 PMMorten Minke
07/01/2024, 7:59 PMMorten Minke
07/01/2024, 7:59 PM