Search code examples
androidandroid-instant-appsandroid-architecture

Currently, data binding does not work for non-base feature modules. Please, move data binding code to the base feature module


I am following Google Codelabs for instant app, and I was trying to create topeka-ui (An UI feature module for instant app).

It tells me to enable data binding like this for that UI module:

instruction for data binding

When I try to enable data binding inside the android block I get the following Error during gradle build.

Error:Currently, data binding does not work for non-base feature modules.
Please, move data binding code to the base feature module.
See https://issuetracker.google.com/63814741 for details

How can I fix it?


Solution

  • Mistake : I was trying to use data binding in non base feature module (As it was not explicitly mentioned in codelab)

    Solution : paste baseFeature = true in android block in the module where you are trying to use data binding.