databinding does not exist: How to solve it?

前端 未结 8 1077
生来不讨喜
生来不讨喜 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

    To see the error, just edit these lines of code in the app's build.gradle:

    dataBinding {
    enabled = false
    } 
    

    In this way, the last error in your build console is the actual error. Because from the first to the penultimate error, they are all related to the non-generation of the data binding classes, precisely because we have disabled it.

    Once you find the error you will enter again :

    dataBinding {
    enabled = true
    } 
    

提交回复
热议问题