FATAL EXCEPTION: main KotlinNullPointerException

后端 未结 4 466
悲哀的现实
悲哀的现实 2021-01-20 10:46

This is my first time building an android application. However when i run the app on my Virtual Device, it stopped working and keeps crashing. The error says something about

4条回答
  •  时光取名叫无心
    2021-01-20 11:05

    val date: EditText? = null
    val changeDate: CheckBox? = null
    val yes: RadioButton? = null
    val no: RadioButton? = null
    

    Before using these variables, initialize them with findViewById or bind them to the xml view.

提交回复
热议问题