So this is my first time using Kotlin and Android studio and I really got to say thus far my experience has been horrible. No other language or IDE has put me in the position where I had to do more than hours research to try and make a simple button load the next page and then still being unable to do it.
This is my Login.kt page
and there you can see its having problems with the findviewbyID and setonlclicklistener.
Top of my Activity_login.xml page
The button im trying to create the onclick event for.
Please keep in mind I did try just the normal creation of setonclick for the button but then I didnt seem to recognize that I have a button with the ID of login_btn
3
Answers
change the init button to
in my case i have removed onclick from xml.
If no answers above can help you, you can use viewbinding to access your view. I had so many problems while using findViewById as a newbie. Here is the documentation,
https://developer.android.com/topic/libraries/view-binding