Android Development Setup
Set up your development environment to build and run React Native applications on Android devices and emulators.Prerequisites
Before you begin, ensure you have the following installed:- Node.js (^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0)
- Java Development Kit (JDK) 17 or newer
- Android Studio
- Android SDK
Installing Android Studio
Download Android Studio
Download and install Android Studio from developer.android.com.
Install Android SDK
During installation, make sure the following components are selected:
- Android SDK
- Android SDK Platform
- Android Virtual Device (AVD)
Environment Variables
Configure your environment variables to point to the Android SDK:Gradle Configuration
React Native uses Gradle as its build system. The main configuration is inandroid/build.gradle:
Key Gradle Properties
Configure yourgradle.properties file:
Android Manifest Configuration
YourAndroidManifest.xml requires specific permissions and configurations:
MainApplication Configuration
Implement theReactApplication interface in your main application class:
Running on Android
Common Build Issues
Gradle Sync Failed
If Gradle sync fails, try:SDK Version Mismatch
Ensure yourcompileSdkVersion matches the installed SDK:
Native Modules Cache
Clear React Native cache:Next Steps
- Learn about integrating React Native into existing apps
- Explore performance optimization
- Configure out-of-tree platforms