Introduction
This article will show you how to run a react native app on an android device or emulator. If you already have the required driver's updated emulator installed, the process is actually quite simple. If you don't, don't worry; we'll walk you through the process of setting up your environment to execute react native-run on android devices.
With React Native, cross-platform mobile apps can be developed that look and feel native on both iOS and Android. If you use React Native, you can test your app on an emulator or on an actual device.
To run React Native on Android, you will need the following prerequisites:
- Node (NPM) and React Native
- (Optional) Android Studio
- (Optional) Visual Studio Code
- JDK 8
How to Run React Native App On Physical Android Device
When you've finished developing your React Native app, it's a good idea to test it on an actual android phone. The reason for this is that emulators behave differently from real devices.
It is essential that you enable Usb debugging on your Android device before you can run a debug app. This can be done by following these steps:
Go to About Phone in Settings

You will need to click the Build number or MIUI version multiple times until you are notified that you are a developer.

In Settings or Additional Settings, you will find a Developer Option.

After that, enable USB debugging and Developer Option.

Run the following command on the terminal after connecting your Android phone to the computer with a USB cable.
adb devices
npx react-native run-android or react-native run-android
You may encounter an error that reads "bridge configuration is not available.". If so, use the following command. The device name should be replaced with yours that you got the name using adb devices. when you type <device name> here.
adb -s <device name> tcp:8081 tcp:8081
react-native run-android
The react native app will run successfully on Android phones if you have followed all the steps listed above correctly. However, it may take some time, depending on the environment.