Running your React Native Android app on an emulator or virtual device

Post Date: February 15, 2018
Last Updated: September 18, 2026

Introduction

React Native allows developers to build mobile applications using JavaScript and React while targeting Android and iOS platforms. During development, an Android emulator or virtual device can be used to test and run the application without requiring a physical Android device.

In this blog, we will explain how to configure an Android Virtual Device and run a React Native Android application on an emulator.

The steps below cover creating an Android Virtual Device, preparing the React Native project, generating the Android bundle, and launching the application on the emulator.

Prerequisites

Before running the React Native application, make sure you have:

  • Android Studio installed on your system.
  • Android SDK configured.
  • An Android Virtual Device (AVD) created.
  • The Android emulator is available and running.
  • Node.js and npm installed.
  • React Native development environment configured.
  • An existing React Native project.
  • Access to a terminal or command prompt.

Implementation

Step 1: Install Android Studio and Create a Virtual Device

Install Android Studio on your development machine.

After installation, open Android Studio and create an Android Virtual Device (AVD) using the Device Manager.

Select an appropriate Android device and system image, then start the emulator.

The emulator should be running before launching the React Native application.

Step 2: Open the React Native Project

Make sure you already have a React Native application configured.

Navigate to the project directory:

cd your-react-native-project

Replace your-react-native-project with the actual project directory.

Step 3: Create the Android Assets Directory

From the React Native project directory, create the required assets directory:

mkdir -p android/app/src/main/assets

This directory will be used to store the generated Android JavaScript bundle.

Step 4: Generate the Android Bundle

Run the following command from the project directory:

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

This command generates the JavaScript bundle required by the Android application.

The important parameters are:

  • --platform android – Specifies Android as the target platform.
  • --dev false – Generates the bundle in non-development mode.
  • --entry-file index.js – Specifies the application’s entry point.
  • --bundle-output – Specifies where the generated bundle should be stored.
  • --assets-dest – Specifies the destination for application assets.

Step 5: Run the React Native Application

Once the emulator is running and the bundle has been generated, execute:

react-native run-android

React Native will build and install the Android application on the running emulator.

Once the build completes successfully, the application should launch automatically on the virtual device.

Conclusion

Running a React Native Android application on an emulator provides a convenient way to test and debug the application during development.

The basic workflow involves:

  1. Installing Android Studio.
  2. Creating and starting an Android Virtual Device.
  3. Opening the React Native project.
  4. Creating the Android assets directory.
  5. Generating the Android JavaScript bundle.
  6. Running the application using react-native run-android.

This allows developers to test their React Native Android applications in a virtual environment before deploying them to physical devices.

Note: The commands in this article reflect the React Native workflow used at the time of the original article. Modern React Native projects may use different commands and tooling depending on the React Native version and project setup.

FAQ

1. What is an Android emulator?

An Android emulator is a virtual Android device that runs on a development computer. It allows developers to test Android applications without using a physical device.

2. Why do I need Android Studio?

Android Studio provides the Android SDK, emulator tools, device management, and other components required to build and test Android applications.

3. What is an Android Virtual Device (AVD)?

An AVD is a configuration that defines a virtual Android device, including its device model, Android version, storage, and other settings.

Related Article

Talk to our experts

Looking for the right technology solution for your business? Our team of experts can help you with development, cloud, DevOps, design, and a wide range of other technology needs. Get in touch with our team here.

admin

Our team has expertise across software and web development, WordPress, e-commerce, mobile applications, UI/UX, cloud and infrastructure, DevOps, CI/CD, API integration, security, testing, automation, and technical support. The team also works with AI-based software solutions, LLMs, AI workflows, AI agents, and intelligent application development to help businesses automate processes and build smarter digital solutions. We focus on developing, deploying, maintaining, and optimising secure, scalable, and reliable technology solutions while helping businesses adopt modern technologies and drive digital transformation.

Leave a Comment

Scroll to Top