9/17/2018

SOLVED React Native android build error GC overhead limit exceeded

Problem

Today I recently encountered an error while building four react native android applications, the error was:

* What went wrong:
Execution failed for task ':app:mergeReleaseResources'.
> GC overhead limit exceeded
and
* What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForRelease'.
> GC overhead limit exceeded

Solution

It appears it has something to do with the memory of the machine or pc, all I did was restart my pc to clear all the previous processes and clean up the memory usage and then build the app again.

I also noticed that while I was developing for 5 hours, my machine was slowly slowing  down which gave me the hint to restart my pc. Anyways, restarting your machine or pc should fix this issue 95% of the time. Hope this helps.