Execution failed for task ':app:dataBindingGenBaseClassesDebug'. Error after upgrading to Android Studio 3.2.1

时间秒杀一切 提交于 2020-04-16 05:11:22

问题


I got the error after making the project:

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:dataBindingGenBaseClassesDebug'.

    Parameter 'directory' is not a directory

This started after upgrading to Android Studio 3.2.1

Any ideas what this could be?


回答1:


The following command worked for me.

./gradlew assembleDebug --rerun-tasks



回答2:


I had the same error at build time and it was caused by a binding variable (that declared inside <data></data> with a Java reserved word as name. For instance <variable name="case" type="com.mydomain.Case" />




回答3:


Removing

 dataBinding {
    enabled = true
}

from the gradle worked. I am no longer using data binding in my project, so this could be the reason.



来源:https://stackoverflow.com/questions/53560653/execution-failed-for-task-appdatabindinggenbaseclassesdebug-error-after-upg

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!