Expiring Daemon because JVM heap space is exhausted In React Native
By React Native debugger
You are seeing multiple times ‘Daemon will be stopped at the end of the build after running out of JVM memory’ and ‘Expiring Daemon because JVM heap space is exhausted’ then you need to improve your JVM heap memory.
Follow the below steps and crack your error

Solution 1
Step 1: Increase Your Heap Size
Add dexOptions in your android/app/build.gradle
android { ... dexOptions { javaMaxHeapSize "4g" }
...}
Step 2: Run Your Project
$ cd android$ gradlew clean$ cd ..$ npx react-native run-android
Solution 2
Step 1: Add below properties on your gradle.properties
Dir -Project\android\gradle.properties
org.gradle.daemon=trueorg.gradle.jvmargs=-Xmx2560m
Step 2: Run Your Project
$ cd android$ gradlew clean$ cd ..$ npx react-native run-android
Please clap and share posts on your social networks…