问题
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