How to use KOIN_USE_COMPOSE_VIEWMODEL correctly? I...
# koin
f
How to use KOIN_USE_COMPOSE_VIEWMODEL correctly? I get this error when using Koin for KMP with @KoinViewModel annotations
Copy code
e: file:///composeApp/build/generated/ksp/android/androidDebug/kotlin/org/koin/ksp/generated/Default326446932.kt:8:17 Unresolved reference 'androidx'.
e: file:///composeApp/build/generated/ksp/android/androidDebug/kotlin/org/koin/ksp/generated/Default326446932.kt:13:63 Unresolved reference 'viewModel'.
e: <file://composeApp/build/generated/ksp/android/androidDebug/kotlin/org/koin/ksp/generated/Default326446932.kt:13:118> Unresolved reference 'get'.
kotlin 2.0.0 ksp 2.0.0-1.0.24 koin 4.0.0-RC1 koin annotations 1.4.0-RC3 I use KOIN_USE_COMPOSE_VIEWMODEL in this way,is it used incorrectly?
1
p
I suggest take a look in this repo and specific branch https://github.com/InsertKoinIO/KMP-App-Template/tree/koin_annotations_1.4
f
Thanks, this is so helpful
koin parrot 1
I found the reason. When I use
defaultModule()
, I get this error. Is this a bug?
149 Views