I am working with React Native and trying to create a debug build, or trying to load the build in emulator using "react-native run-anroid" command. I am getting the following error:
Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
See the screenshot below:
How can I resolve this error?
Comment below line in gradle.properties
inside android
folder using #
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
To
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With