GC overhead limit exceeded Android Studio

Viewed 347

When I run my project, The next error shows up.

        Error:Execution failed for task ':MyApp:compileDebugJavaWithJack'. > java.lang.RuntimeException: java.lang.OutOfMemoryError:

But I am using the code below in my build.gradle file.

            dexOptions {
            incremental true
                javaMaxHeapSize "4g"
            }

What can I do to avoid this failure?. Could anyone please help me out?

0 Answers
Related