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

TarunY

05/19/2020, 9:17 AM
Hello All, I am getting below error. any suggestions
a

Arun

05/19/2020, 9:20 AM
Do you have any property that calls
getLifecycle
? If so please try replacing it with a lazy delegate such as
Copy code
private val someProp by lazy { \\ access lifecycle here }
It crashes because if value is directly assigned, it is equivalent to calling the constructor and lifecycle object is not yet created.
t

TarunY

05/19/2020, 9:29 AM
yes i have let me try this
@Arun thanks alot it worked :)
👍🏼 1