Hi everyone, can you get savedstatehandle in viewm...
# koin
r
Hi everyone, can you get savedstatehandle in viewmodel when using koin annotation? I'm getting
Missing Definition for property 'savedStateHandle : androidx.lifecycle.SavedStateHandle
Copy code
@KoinViewModel
class MyViewmodel(private val savedStateHandle: SavedStateHandle): ViewModel() {
    //do something
}
Also I'm trying this in a KMM project
👀 1
1
a
what version do you use?
r
I'm using : 2.0.0-RC1 - annotations 4.1.0-Beta5 - koin
a
ok, curious. Can you go with Koin 4.0.2 instead?
r
Sure I'll try it and let you know
👍 2
I get the same error
Copy code
Missing Definition for property 'savedStateHandle : androidx.lifecycle.SavedStateHandle
Fix your configuration: add definition annotation on the class
Also do check this multiplatform thread
a
do you have a sample to reproduce?
r
Here you go. It's a sample kmm project with 2.0.0-RC1 - annotations 4.0.2 - koin
a
Thanks, I will look at it
thank you color 1
found the guilty 😄
it's fixed. Looking for next RC
r
Woow that great news! Thank you! 🚀
j
Is this only an issue if the project is KMM vs a pure Android project?
a
in KMP project mainly