https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
c

chi

03/28/2024, 12:35 AM
Hello everyone, I’m using multiplatform with the newly released viewmodel api and I’m getting the error whenever I try to call the viewmodel from the my composable (injecting with Koin), however if I remove it from the composable it doesn’t work crash, any idea why this could be happening please?
"java.lang.ClassNotFoundException: Didn't find class "androidx.core.app.CoreComponentFactory" on path: DexPathList[[],nativeLibraryDirectories=[/data/app/com.android.chrome-MyzPsVBX0jIeJ6O8eoDPKg==/lib/arm64, /data/app/com.android.chrome-MyzPsVBX0jIeJ6O8eoDPKg==/base.apk!/lib/arm64-v8a, /data/app/com.google.android.trichromelibrary_626111933-E-y3217F2r5vO_z21w-zVQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196) at java.lang.ClassLoader.loadClass(ClassLoader.java:379)"
g

Gleb

03/28/2024, 10:22 AM
How exactly are you injecting it?
c

chi

03/28/2024, 10:36 PM
I’m using
koinInject()
to inject the viewmodel in my composable
I fixed it now, the issue was because of the organization of my dependencies, the error message wasn’t helpful
9 Views