https://kotlinlang.org logo
#android
Title
# android
j

jurajsolarml

01/02/2019, 1:33 PM
Hello,I have bug. Can you help me ? /Kotlin/ Thanks http://www.hatebin.com/gycgffclfg http://www.hatebin.com/hzfcwwyufq
m

Mark McCormick

01/02/2019, 1:38 PM
Hi. What are you trying to accomplish with
val intent = Intent(this@RegisterActivity, User::class.java)
.
j

jurajsolarml

01/02/2019, 1:53 PM
Run the registerUser activity, but I've already fixed it but it's writing a bug
m

Mark McCormick

01/02/2019, 1:56 PM
in that case RegisterActivity::class.java should be the second argument. The first one is just a context.
j

jurajsolarml

01/02/2019, 2:13 PM
It is correct ? registerUser.setOnClickListener { val = Intent Intent (context, RegisterActivity :: class.java) startActivity (intent)
c

Casey Kulm

01/02/2019, 5:01 PM
What activity are you trying to start? You have to put the class of that Activity as the second parameter, not the the current activity
j

jurajsolarml

01/02/2019, 5:30 PM
I tried to run registerUser registration with verification
c

Casey Kulm

01/02/2019, 5:42 PM
Not sure what that means
j

jurajsolarml

01/02/2019, 5:45 PM
registerUser is a user registration
c

Casey Kulm

01/02/2019, 5:53 PM
Okay
d

dididi

01/10/2019, 12:13 AM
are you sure your ‘User’ is a activity?cause its a cast error