# FAILURE: Build failed with an exception

**URL:** <https://discuss.circleci.com/t/failure-build-failed-with-an-exception/28598>\
**Category:** Bug Reports\
**Created:** [February 25, 2019, 4:32pm UTC](https://discuss.circleci.com/t/failure-build-failed-with-an-exception/28598 "2019-02-25T16:32:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lulu](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/lulu/32/21500_2.png) [@lulu](https://discuss.circleci.com/u/lulu)\
**Post date:** [February 25, 2019, 4:32pm UTC](https://discuss.circleci.com/t/failure-build-failed-with-an-exception/28598/1 "2019-02-25T16:32:10Z")

</div>

Gradle is terminating early.

#!/bin/bash -eo pipefail  
./gradlew assembleWebDebug

```
Parallel execution is an incubating feature. WARNING: The option 'android.enableAapt2' is deprecated and should not be used anymore. Use 'android.enableAapt2=true' to remove this warning. It will be removed at the end of 2018.. WARNING: Configuration 'androidTestCompile' is obsolete and has been replaced with 'androidTestImplementation' and 'androidTestApi'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html WARNING: Configuration 'androidTestApi' is obsolete and has been replaced with 'androidTestImplementation'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html Building for the ARM and x86 architectures Create separate apks: false Support for CMake 3.7 and higher is a preview feature. To report a bug, see https://developer.android.com/studio/report-bugs.html Support for CMake 3.7 and higher is a preview feature. To report a bug, see https://developer.android.com/studio/report-bugs.html Support for CMake 3.7 and higher is a preview feature. To report a bug, see https://developer.android.com/studio/report-bugs.html Support for CMake 3.7 and higher is a preview feature. To report a bug, see https://developer.android.com/studio/report-bugs.html Support for CMake 3.7 and higher is a preview feature. To report a bug, see https://developer.android.com/studio/report-bugs.html Support for CMake 3.7 and higher is a preview feature. To report a bug, see https://developer.android.com/studio/report-bugs.html
...
----- End of the daemon log -----

FAILURE: Build failed with an exception.

* What went wrong:
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org
Exited with code 1
```

---

<div class="post-metadata">

**Author:** ![drazisil](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/drazisil/32/24029_2.png) [@drazisil](https://discuss.circleci.com/u/drazisil)\
**Post date:** [February 25, 2019, 4:50pm UTC](https://discuss.circleci.com/t/failure-build-failed-with-an-exception/28598/2 "2019-02-25T16:50:41Z")

</div>

Is the exit code for the step 137? Gradle often runs out of memory. If so, this support center article may help [https://support.circleci.com/hc/en-us/articles/115014359648-Exit-code-137-Out-of-memory](https://support.circleci.com/hc/en-us/articles/115014359648-Exit-code-137-Out-of-memory)
