org.koin.core.error.NoParameterFoundException: Can't get injected parameter #0 from DefinitionParameters[] for type 'androidx.lifecycle.SavedStateHandle'

 org.koin.core.error.NoParameterFoundException: Can't get injected parameter #0 from DefinitionParameters[] for type 'androidx.lifecycle.SavedStateHandle'

Replace:

// Inject the ServerTwoViewModel using Koin
private val serverTwoViewModel by viewModel<ServerTwoViewModel>()
To:
// Inject the ServerTwoViewModel using Koin
private val serverTwoViewModel by stateViewModel<ServerTwoViewModel>() 
 
 

 

Комментариев нет:

Отправить комментарий