If your error log mentions task '_', JavaExec, or ProjectScopeServices, it means that the Gradle Daemon (which runs in the background and usually speeds up builds) is corrupted and needs to be stopped. Close your IDE, run gradlew --stop (or ./gradlew --stop on *nix) in the same directory of your project, then reopen your IDE and refresh/reload the Gradle settings (IDEA: Gradle tab, the reload icon; Eclipse: right-click the project, 'Refresh Gradle Nature')