[英]How to reInitialized view when going into another class kotlin
Im getting this error我收到这个错误
kotlin.UninitializedPropertyAccessException: lateinit property recyclerView has not been initialized,
and i wonder if its possible to reInitialized my recyclerview when i go from another class then back to the view again?.我想知道当我从另一个 class 的 go 然后再次回到视图时,是否有可能重新初始化我的 recyclerview?
This error shows that you have use lateinit
property and didn't initialize it.Do initialize it in onCreate()
method.Checkout this https://kotlinlang.org/docs/reference/properties.html#late-initialized-properties-and-variables此错误表明您使用
lateinit
属性并且没有对其进行初始化。请在onCreate()
方法中对其进行初始化。检查此https://kotlinlang.org/docs/reference/properties.html#late-initialized-properties-and -变量
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.