JVM doesn't have enough memory to compile the Java files. (REACT NATIVE)


Step 1: Add below properties on your android\gradle.properties

=>
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx2560m

If step 1 not works ,implement step 1 with step 2

Step2.

Add dexOptions in your android/app/build.gradle

android {      
dexOptions {

javaMaxHeapSize "4g"

}


}

Did you find this article useful?