Has anyone ever had issues using ViewBinding with ...
# android
d
Has anyone ever had issues using ViewBinding with Configuration Qualifiers? I have a fragment that contains a separate layout included that has a version in the
layout
folder and a version in the
layout-h700dp
folder. Both of these layouts use viewbinding as well, so I can access their elements from the fragment code. The issue is that when I launch on a small screen device, the view builds inflates fine and has the proper layout, but when I launch on a large screen device the fragment inflation fails and gives me the following error:
Copy code
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: <http://com.example.android.dev.qa|com.example.android.dev.qa>, PID: 10543
    java.lang.NullPointerException: Attempt to invoke virtual method 'void com.example.android.databinding.TheIncludedLayoutName.invalidateAll()' on a null object reference
I'm pretty stumped on this one as it seems like a common pattern to provide different layouts for different screen heights, and I have no idea why viewbinding would crash on only a larger screen device unless it has something to do with the compile time selection of the larger layout resource and the viewbinding impl. Any help would be much appreciated!
😶 1