When data binding is used inside dynamic feature module layout files and the same views/widgets I try to access inside fragment or activity throws NullPointerException error.
At same time if I try to access same view with findById it works perfectly. If the layout file is starting and ending with "<layout>" tag it gives the error, if it's removed the the code works perfectly. I tried all possible solutions and both data and view binding is turned on through Gradle. I have following app structure app -> works with dependency of base base -> contain all base functions and code dynamicFeature -> works with dependency of base and app.
The dynamic feature module should not give null pointer when view is accessed through ViewDataBinding layouts created with "<layout>" tag in it.
minSdk 26 maxSdk 33 compileSdk 33