androidbroadcast / ViewBindingPropertyDelegate

Make work with Android View Binding simpler
https://proandroiddev.com/make-android-view-binding-great-with-kotlin-b71dd9c87719
Apache License 2.0
1.42k stars 102 forks source link

Cresh issue #94

Closed heylee closed 2 years ago

heylee commented 2 years ago

Fatal Exception: java.lang.IllegalStateException Access to viewBinding after Lifecycle is destroyed or hasn't created yet. The instance of viewBinding will be not cached. by.kirich1409.viewbindingdelegate.LifecycleViewBindingProperty.runStrictModeChecks (LifecycleViewBindingProperty.java:111) by.kirich1409.viewbindingdelegate.LifecycleViewBindingProperty.getValue (LifecycleViewBindingProperty.java:90) by.kirich1409.viewbindingdelegate.LifecycleViewBindingProperty.getValue (LifecycleViewBindingProperty.java:71)

heylee commented 2 years ago

com.github.kirich1409:viewbindingpropertydelegate:1.5.0-beta01 version

kirich1409 commented 2 years ago

The crash expected because you try to access ViewBinding outside of Fragment's View lifecycle. I can tell more details but need full stack trace and you need to use the latest version of the library