We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG The bug is if i use navigation or anywhere in my *ViewModel" show this error
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/koin/androidx/viewmodel/GetViewModelKt
`import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewmodel.compose.viewModel class AuthViewmodel(private val authUseCase: AuthUseCase) : ViewModel() {.............}`
actual fun platformModule(): Module = module { single { dataStore(get()) } viewModelOf(::AuthViewmodel) } private fun initKoin() { val modules = sharedKoinModules + platformModule() startKoin { androidContext(this@AuditApplication) modules(modules) } }
version: koinCore = "4.0.0"
Error in the page of LoginActivity
class LoginActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) WindowCompat.setDecorFitsSystemWindows(window, false) setContent { AuditTheme { AuditLogin() } } } } sealed class Screen(val title: String) { data object LoginScreen : Screen("Login") data object ClientCodeScreen : Screen("ClientCode") data object ForgotPasswordScreen : Screen("Forgot") data object ResetPasswordScreen : Screen("Reset") data object LoginSuccessScreen : Screen("Success") } @Composable fun AuditLogin() { val navController = rememberNavController() Scaffold( containerColor = Color.Transparent, contentColor = MaterialTheme.colorScheme.onBackground, contentWindowInsets = WindowInsets(0, 0, 0, 0) ) { padding -> Row( Modifier .fillMaxSize() .padding(padding) .windowInsetsPadding( WindowInsets.safeDrawing.only( WindowInsetsSides.Horizontal ) ) ) { val authViewmodel = koinViewModel<AuthViewmodel>() NavHost(navController, startDestination = Screen.ClientCodeScreen.title) { // ClientCodeScreen Composable composable(Screen.ClientCodeScreen.title) { ClientCodeScreen(navigateToLogin = { navController.navigate(Screen.LoginScreen.title) },authViewmodel) } composable(route = Screen.LoginScreen.title, ) { backStackEntry -> LoginScreen(navigateToForgotPasword = { navController.navigate(Screen.ForgotPasswordScreen.title) }) }
val authViewmodel = koinViewModel()
it show the error
The text was updated successfully, but these errors were encountered:
No branches or pull requests
BUG
The bug is if i use navigation or anywhere in my *ViewModel" show this error
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/koin/androidx/viewmodel/GetViewModelKt
version:
koinCore = "4.0.0"
Error in the page of LoginActivity
val authViewmodel = koinViewModel()
it show the error
The text was updated successfully, but these errors were encountered: