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

jordan29.04.1197

07/20/2017, 9:12 AM
Hi all, Can you help me?
Copy code
val dialogAvatarSource = DialogAvatarSource(this)
        dialogAvatarSource.onAvatarSourceChosenListener = object : DialogAvatarSource.OnAvatarSourceChosenListener {
            override fun onCameraClick() {

            }

            override fun onGalleryClick() {

            }
        }
        dialogAvatarSource.show()
java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter savedInstanceState on dialogAvatarSource.show()
m

menegatti

07/20/2017, 9:13 AM
@jordan29.04.1197 could you please wrap your code with 3 ` ?
regardless of which, the error is pretty clear, you set
savedInstanceState
as non-null and when the code reached
dialogAvatarSource.show()
,
savedInstanceState
is null
j

jordan29.04.1197

07/20/2017, 9:15 AM
Oh, I see thx.
2 Views