I’m trying to make a simple app, in this app there is only one button and when its clicked it will switch to another new activity
first activity code:
button.setOnClickListener { var intent = intent(this,second::class.java) startActivity(intent) }
intent becomes red with this error showing: “expression intent of type intent cannot be invoked as a function. the function invoke is not found”
what is the problem?