https://kotlinlang.org logo
Title
s

Sam

10/04/2018, 9:14 PM
Why does studio autofill generates a nullable bundle for onRestoreInstanceState?
override fun onRestoreInstanceState(savedInstanceState: Bundle?) {
        super.onRestoreInstanceState(savedInstanceState)
    }
t

Taras Koshkin

10/04/2018, 9:21 PM
It'll do this until they label it
@NotNull
in the code. If you're using support libs 27+ I believe they updated it so you'll have not null Bundle
s

Sam

10/04/2018, 9:23 PM
Got it, fwiw, i'm on androidx1.0.0 so yeah it still is the case
t

Taras Koshkin

10/04/2018, 9:24 PM
Oh really? And you're extending
AppCompatActivity
?
s

Sam

10/04/2018, 9:24 PM
Yup, cmd+b still takes to java version of it
l

louiscad

10/05/2018, 6:28 PM
AndroidX is not full Kotlin at all, it is Java, with Kotlin extensions if you use ktx. Do you use SDK 28+?
s

Sam

10/05/2018, 6:29 PM
Was on 28.0.0 before migrating to AndroidX
l

louiscad

10/05/2018, 6:30 PM
@Sam
28.0.0
is not an Android SDK version
s

Sam

10/05/2018, 6:32 PM
Oh do you meant target version?
l

louiscad

10/05/2018, 6:43 PM
compileSdk
s

Sam

10/05/2018, 6:44 PM
that is 28