databinding does not exist: How to solve it?

前端 未结 8 956
生来不讨喜
生来不讨喜 2021-01-01 20:37

I\'m working on an Android application with databinding but I\'ve always next error:

Error: Package my.package.databinding

相关标签:
8条回答
  • 2021-01-01 21:36
    dataBinding {
        enabled = true
    }
    

    enabled the data binding in app build.gradle file. its worked

    0 讨论(0)
  • 2021-01-01 21:37

    After deleting the build folder for the project and submodules, making, rebuilding, etc etc etc, the only thing that worked for me was:

    create a new layout

    I think there's something in the generator that gets messed up and that flushes it (totally guessing here)

    0 讨论(0)
提交回复
热议问题