lateinit property NotaViewModel has not been initialized Error
So im trying to do an update in my sqlite data but its giving me error in the viewmodel. Its odd because in my Mainactivity i use one deletebyid and its working just fine, and error occurs when i click in the button, even if i put the notaViewModel.updateNotaByID(id, titulo.toString(), descricao.toString()) like notaViewModel.updateNotaByID(2, "static", "justtosee").
class EditarNota : AppCompatActivity() {
private lateinit var tituloText: TextView
private lateinit var descText:...