Using Android Studio 3.0 Beta 6.
This error is happening more and more, when I try build my project:
Error:Execution failed for task ':app:compileDebugJavaWithJavac'. java.lang.OutOfMemoryError: GC overhead limit exceeded
I have tried to fix it using this SO answer: Android Studio: GC overhead limit exceeded
However it has made no difference. The only way to fix it, is a reboot of my MBP and then all is fine for the next few builds, until it resurfaces again.
Any ideas how to fix this?