I am getting started for using DataBinding feature. I am facing problem with it.
Error:(21, 9) error: cannot find symbol class ContactL
In my case I had the same issue but the reason was different. My onClick function was declared private in the activity class, so be sure that, if you are using a handler function inside the layout, the function must not be private.
// this will not be visible in the binded layout because it's private!
private fun mainButtonClick(view: View) {
if (viewModel.isRecording.value == true) {
stopRecordingAndPlaying()
} else {
startRecordingAndPlaying()
}
}