You might try flipping to use Anko. The syntax then looks like
You use the first variant, when you want to load up the intent with extras, flags, and whatnot. Without Anko, the above link suggests you say
val intent = Intent(this, javaClass<SomeOtherActivity>())
Leading you to the odd question of what exactly is the difference between javaClass<Foo>() and Foo::class.java. I don’t have a clear understanding of the answer to that question.
What “worked for me” when I had to deal with this, before I started using Anko, was something like so:
val activityIntent = Intent(context, PermissionActivity::class.java)
So, and this is now in wild-assed-guess territory, you’ll notice that startActivity is really a method on a Context of some sort. You might want to investigate exactly what context you’re using, or should be using, to make this happen.
I encounter the same problem today. Most probably you overrides the onCreate with two parameters onCreate(savedInstanceState: Bundle, persistentState: PersistableBundle) instead of the original onCreate
so your onCreate was never called. This might be due to an IDE auto-complete issue.