Error Log
1 2 3 4 5 6 7 8 9 |
<strong>Error</strong>:java.lang.OutOfMemoryError: GC overhead limit exceeded Or <strong>Error</strong>:Execution failed for task ':projectName:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines /jdk1.8.0_101.jdk/Contents/Home/bin/java'' finished with non-zero exit value 3 |
Solution 1
1 2 3 4 5 6 7 8 9 10 11 12 |
1 - Put in your local.properties org.gradle.jvmargs=-XX:MaxHeapSize\=512m -Xmx512m 2 - add (multiDexEnabled true) in gradle. defaultConfig { applicationId "project package" minSdkVersion ** targetSdkVersion ** versionCode ** versionName "**" multiDexEnabled true } |
Solution 2
Try to run the app in “installDebug“.
1 2 3 4 5 6 7 8 |
Just increase the heap size a little by setting this option in Run → Run Configurations → Arguments → VM options -Xms1024M -Xmx2048M Xms - for minimum limit Xmx - for maximum limit |
Please see the screenshot: