I am trying to proceed to the next action using my button listener and it says unresolved reference java
Here is my code:
btn?.setOnClickListener(object: View.OnClickListener {
override fun onClick(view: View): Unit {
val intent = Intent(this@MainActivity,NextActivity::class.java)
Toast.makeText(this@MainActivity,"helllo",Toast.LENGTH_LONG).show()
}
})
NOTE. Here is NextActivityalso a kotlin file.
The error shown in the image

source
share