---
title: "Out of memory error while building React Native for Android"
canonical_url: "https://www.nutrient.io/guides/react-native/troubleshooting/out-of-memory-error-react-native-android/"
md_url: "https://www.nutrient.io/guides/react-native/troubleshooting/out-of-memory-error-react-native-android.md"
last_updated: "2026-05-29T21:56:52.980Z"
description: "Solutions for common issues and errors in Nutrient React Native SDK with debugging tips and workarounds."
---

You might run into a `java.lang.OutOfMemoryError` error while trying to build React Native for Android emulators and Android devices.

You can explore some of the solutions discussed in this [known React Native issue](https://github.com/facebook/react-native/issues/6799).

You can also try adding `org.gradle.jvmargs=-Xmx4608m` to the `gradle.properties` file in the `android` folder of your React Native project.

Your `gradle.properties` file might look like this:

```groovy

org.gradle.jvmargs=-Xmx1536M
org.gradle.configureondemand=false
android.useAndroidX=true
android.enableJetifier=true

```
---

## Related pages

- [Guide to adding a Nutrient license key in React Native](/guides/react-native/troubleshooting/add-license-key.md)
- [Find out your Nutrient version easily](/guides/react-native/troubleshooting/getting-the-currently-used-version.md)
- [Android Gradle Plugin Requires Java 11](/guides/react-native/troubleshooting/android-gradle-plugin-requires-java-11.md)
- [Fix new architecture build issues in React Native](/guides/react-native/troubleshooting/new-architecture-build-issues.md)
- [Nightlies](/guides/react-native/troubleshooting/nightlies.md)
- [How to find your iOS app bundle ID easily](/guides/react-native/troubleshooting/finding-the-bundle-id.md)
- [NutrientView inside a modal is blank or crashes on Android](/guides/react-native/troubleshooting/nutrientview-modal-android.md)
- [Fixing Android back button crash with Nutrient](/guides/react-native/troubleshooting/handling-back-navigation-with-react-native-screens.md)
- [Managing Nutrient's render cache effectively](/guides/react-native/troubleshooting/outdated-render-cache.md)
- [React Navigation](/guides/react-native/troubleshooting/react-navigation.md)
- [View controller-based status bar appearance](/guides/react-native/troubleshooting/view-controller-based-status-bar-appearance.md)
- [Fix Xcode error code 65 for React Native on M1 Macs](/guides/react-native/troubleshooting/xcode-error-65-missing-required-target-architectures-react-native.md)
- [Understanding app IDs in Android development](/guides/react-native/troubleshooting/what-is-an-app-id.md)
- [Textinput Error React Native Android](/guides/react-native/troubleshooting/textinput-error-react-native-android.md)
- [Understanding bundle IDs for iOS app development](/guides/react-native/troubleshooting/what-is-a-bundle-id.md)
- [CMake/Ninja build error caused by long file paths on Windows](/guides/react-native/troubleshooting/windows-path-length-cmake-error.md)

