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
It seems like you forgot to initialize date editText. Why not to try Kotlin Android Extension plugin. By using this plugin you don't need to initialize the views instead you can directly use them using their id. For your case:
Just add import
import kotlinx.android.synthetic.main.activity_add_sales.*
Then you can now remove your:
val date: EditText? = null
val changeDate: CheckBox? = null
val yes: RadioButton? = null
val no: RadioButton? = null
and you can access them by their ids. like
date.setText("15-11-2017")