Kotlin Android One button works but other doesn't
button1 is working perfectly fine but on clicking button, it crashes my app. Why is it happening?
val button:Button=findViewById(R.id.signUp)
val button1:Button=findViewById(R.id.logIn)
button.setOnClickListener{
val intent1 = Intent(this,SignUpPage::class.java)
startActivity(intent1)
}
button1.setOnClickListener {
val intent2 = Intent(this,Welcome::class.java)
startActivity(intent2)
}