Hi good morning! I found an issue using koin-compo...
# koin
h
Hi good morning! I found an issue using koin-compose that I want to share here with you:
Copy code
java.lang.NoSuchMethodError: No virtual method getArguments()Landroidx/core/bundle/Bundle; in class Landroidx/navigation/NavBackStackEntry; or its super classes (declaration of 'androidx.navigation.NavBackStackEntry' appears in /data/app/~~eDu8TzzovPpH_RkKjlwSbQ==/org.random.users-7jSOQKt_l7Mp8TvIfhdtLQ==/base.apk!classes13.dex)
That error corresponds on these lines:
Copy code
@OptIn(KoinInternalApi::class)
@Composable
fun defaultNavExtras(viewModelStoreOwner: ViewModelStoreOwner): CreationExtras = when {
    //TODO To be fully verified
    viewModelStoreOwner is NavBackStackEntry && viewModelStoreOwner.arguments != null -> viewModelStoreOwner.arguments?.toExtras(viewModelStoreOwner) ?: CreationExtras.Empty
    viewModelStoreOwner is HasDefaultViewModelProviderFactory -> viewModelStoreOwner.defaultViewModelCreationExtras
    else -> CreationExtras.Empty
}
Debugging viewModelStoreOwner is not null and have arguments the accessor of viewModelStoreOwner.arguments fails I tried using in the navhost composable the bot approaches:
Copy code
val userDetailViewModel: UserDetailViewModel = koinNavViewModel()
Thanks!
a
in latest beta koinNavViewModel is still having issues. I'm on it with JB team
❤️ 1