I was trying to build project that have multi flavors and I get the GC overhead limit exceeded when try to get any release of any flavor I know the solution is by adding this to my build.gradle in android dexOptions { javaMaxHeapSize "4g" } because that will maximize the heap size .. but now my question is? what is the main cause of this problem? the error raised from android studio it self because it developed by java or raised from my application it self.
Asked
Active
Viewed 19 times
0
-
1Read https://stackoverflow.com/questions/1393486/error-java-lang-outofmemoryerror-gc-overhead-limit-exceeded – IntelliJ Amiya Aug 23 '17 at 10:13
-
really thanks but this mean the error get out from android studio because the long build process of the application.. – Mina Samir Aug 23 '17 at 10:28
-
1In a word, no. The problem is not related to the length of the build process. It is possibly related to the size of the software you are trying to build, or the number of different versions / flavors you are trying to build at the same time. That could increase the amount of memory you require ... leading to GC overhead limit errors when you are close to running out. – Stephen C Aug 23 '17 at 10:49
-
thanks a lot .. :) – Mina Samir Aug 23 '17 at 10:58