Please help, I am not able to instantiate viewMode...
# compose
s
Please help, I am not able to instantiate viewModel which has dependencies injected to it through hilt. The app. crashes when I start that activity
s
Check this Android/Compose/Hilt sample https://gitlab.com/gLush/androidhilt
i
Are you using Fragment 1.3.3? That sounds like https://issuetracker.google.com/issues/186097368
s
So the problem was with this line myViewModel: myViewModel=viewModel() where myViewModel is ViewModel with dependencies and I am trying to set default value of viewModel in composable function parameters. I removed all of them and now it started working again, why this was the problem?