18

When I try to build my project, I get such a mistake:

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:dataBindingGenBaseClassesDebug'.
> Parameter 'directory' is not a directory
2

1 Answer 1

42

From an answer to a similar question:

  1. Delete the .gradle directory (in the project base directory)
  2. Invalidate Caches and restart Android Studio (if necessary)

EDIT: Step 2 doesn't appear necessary on *nix systems

3
  • 7
    Just the first step, i.e. rm -rf .gradle/ did the trick for me.
    – Erik
    Nov 20, 2020 at 15:18
  • 1
    For me was enough first step. rm -rf .gradle/
    – Black_Zerg
    Feb 24, 2021 at 11:28
  • 1
    Worked for me too. I saved the files before delete and grep'ed for the word directory and none had it. Weird... Mar 4, 2021 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.