I have a ionic project. The app was build and run in my android phone successfully before. But suddenly from someday, when I run command "ionic cordova run android" I get the build error as below:
Execution failed for task ':transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
I have tried "cordova clean" to synchronise the cordova plugin. But it doesn't work..
How to solve this problem?
Add this in your build.gradle file-
also you could follow - Android Studio Google JAR file causing GC overhead limit exceeded error
Open
gradle.properties
under your project root directory and add/modify below line toSpecifies the JVM arguments used for the daemon process. The setting is particularly useful for tweaking memory settings. Change
-Xmx3536m
to a larger value if this still does not meet your requirement.And, modify your module level
build.gradle