erluxman erluxman - 3 years ago 219
Android Question

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?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download