View binding binder null pointer exception - Android

Viewed 10

I am getting view binding null exception is occurring in fragment when i try to inject a broadcast recevier using hilt.

The implementation is done as per https://developer.android.com/topic/libraries/view-binding

But the issue happens only when i try to inject a broadcast reciever / Channel.

User navigates from Fragment-A to Fragment-B and then from Fragment-B to Fragment-A using fragment navgraph, then the issue happens.

if the " _binder = null " is removed from onDestroyView() method, the app won't crash. but the updates are not reflected in the UI.

0 Answers
Related