title: Gradle - What is a non-zero exit value and how do I fix it?
body: <p>I am developing an Android application, and every time I run it, I get this message:</p>
  
  <pre><code>:module:someTask FAILED
  FAILURE: Build failed with an exception.
  * What went wrong:
  Execution failed for task ':module:someTask'.
  &gt; some message here...  finished with non-zero exit value X
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  BUILD FAILED
  Total time: Y.ZZ secs
  </code></pre>
  
  <p>I have already tried cleaning and building the project, but the error persists. </p>
  
  <p>I have seen answers that say to enable Multidex or increase the heap size, but I am sure I don't need either solution.</p>
  
  <p>What can I do to solve this?</p>
  
  <hr>
  
  <p><sup><em>About this question: This is a direct extension of <a href="https://stackoverflow.com/questions/3988788/what-is-a-stack-trace-and-how-can-i-use-it-to-debug-my-application-errors">What is a stack trace, and how can I use it to debug my application errors?</a> except you are looking at a Gradle stack trace instead of a Java stack trace.</em></sup></p>