<Type mismatch: inferred type is but was expected>...
# stackoverflow
u
Type mismatch: inferred type is but was expected I'm new to Kotlin and here is my problem: I use dataBinding in my app and When I want to set my variable from layout: My main activity: @Inject lateinit var viewModelFactory: ViewModelProvider.Factory on create: val viewModel:NoteViewModel = ViewModelProviders.of(this,viewModelFactory) .get(NoteViewModel::class.java) binding.noteViewModel = viewModel binding.executePendingBindings() so up to this point, my code is correct but, when...