How to run React Native App using Android Studio Emulator


In this article, we take a look at how to run React Native App in Android Studio Emulator, step-by-step.

  1. Install NodeJS.
    Windows: Download Setup - https://nodejs.org
    Mac (macOS): Follow Tutorial: https://code2care.org/tutorial/quick-steps-to-install-nodejs-on-macos
  2. Install React Native CLI using npm,
    % npm install -g react-native-cli
  3. Create a react-native project,
    % react-native init my_android_app
  4. Create and run Android Emulator using Android Studio,
    Run Android Studio Emulator
  5. Create environment variable ANDROID_HOME as C:\Users\c2c\AppData\Local\Android\sdk
  6. Run the app using the command,
    % npx react-native run-android

If you do not launch the emulator you get an error,

error Failed to launch the emulator. Reason: No emulators found as an output of `emulator -list-avds`.
warn Please launch an emulator manually or connect a device. Otherwise, the app may fail to launch.
-

Facing issues? Have Questions? Post them here! I am happy to answer!


Author Info:

Rakesh (He/Him) is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap