question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Access to viewBinding after Lifecycle is destroyed or hasn't created yet. The instance of viewBinding will be not cached.

See original GitHub issue
version  1.5.6

 at by.kirich1409.viewbindingdelegate.LifecycleViewBindingProperty.runStrictModeChecks(ViewBindingProperty.kt:112)

` ``
Don't  throw exception , OK ?


Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10

github_iconTop GitHub Comments

3reactions
Reginercommented, May 12, 2022

add ViewBindingPropertyDelegate.strictMode = false in Application#onCreate

Maybe the author forgot what he wrote .

1reaction
Reginercommented, Apr 24, 2022

May be it’s normal you’ve checked , But app creash . Why throw an exception? shouldn’t do anything.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ViewBindingPropertyDelegate/ViewBindingProperty.kt at master
Make work with Android View Binding simpler. ... import androidx.lifecycle. ... viewBinding after Lifecycle is destroyed or hasn't been created yet. " +....
Read more >
viewBinding is not working with error (Android studio 4)
Rebuilt the project and the bindings were all back with no compile ... ViewBinding recreate broken xml and return xml to correct state....
Read more >
Handling Lifecycle with View Binding in Fragments - Medium
In the init block, we observe the Fragments viewLifecycleOwner . A Fragment's View can be created and destroyed many times, so it may...
Read more >
Save UI states - Android Developers
The activity is created after a configuration change. Since the ViewModel instance hasn't been destroyed, the ViewModel has all the information ...
Read more >
ViewBinding 与Kotlin 委托双剑合璧- 彭旭锐- 博客园
+ "The instance of viewBinding will be not cached. ... "Access to viewBinding after Lifecycle is destroyed or hasn't created yet.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found