Intents in Kotlin
Intents using Kotlin for Android are almost same we just need to change slight in the syntax as below.
val intent = Intent(this,HelloActivity::class.java) startActivity(intent)
Exception that you are getting is null pointer exception in your onCreate
method on the activity, please check the same..
Ensure you have (question mark):
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
Instead:
override fun onCreate(savedInstanceState: Bundle) {
super.onCreate(savedInstanceState)
}