I am new to Android Studio. I wrote a simple code in the
main_activity.xml file, with
ids. But when I try to reference the
ids from my
MainActivity.kt file. It shows an error
Unresolved reference: btnDatePicker i.e an unresolved error.
And Here’s a screenshot of my
activity_main.xml, as you’ll see I have circled the particular
id I’m trying to reference.
Source: Android Studio Questions