Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter convertView

后端 未结 4 727
刺人心
刺人心 2021-01-03 21:54

I got this error just after converted the adapter code to Kotlin:

java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.         


        
4条回答
  •  庸人自扰
    2021-01-03 22:50

    Make convertView nullable:

    convertView: View?
    

    I'm not sure why the line number is wrong, but the stacktrace tells you where to look in the error message.

提交回复
热议问题