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
Erik
  • 4,305
  • 3
  • 36
  • 54
kirvel
  • 629
  • 1
  • 6
  • 13
  • Please show the full stacktrace – DevHyperCoder Aug 12 '20 at 08:41
  • 1
    Does this answer your question? [java.lang.IllegalArgumentException: Parameter 'directory' is not a directory in android](https://stackoverflow.com/questions/54018148/java-lang-illegalargumentexception-parameter-directory-is-not-a-directory-in) – Android_id Aug 14 '20 at 06:37

1 Answers1

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

Peter L
  • 2,921
  • 1
  • 29
  • 31