Skip to content Skip to sidebar Skip to footer

Oncreate Not Called On Activity

I've created AbstractActivity and an AbstractFormActivity to rid of some boilerplate code, their content may be irrelevant to the question, but I will post it anyway, maybe I misun

Solution 1:

onCreate() version you are currently using is added in Android 21. You should use version below instead:

protectedvoidonCreate(Bundle savedInstanceState)

Solution 2:

I have also faced the same issue. After a couple of hours, I found my mistake, instead on (savedInstanceState: Bundle, persistentState: PersistableBundle) function has to override the below one.

overridefunonCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
}

Post a Comment for "Oncreate Not Called On Activity"