In this article, we are going to describe how to run our premium React Native Apps on Android. The process is actually pretty straightforward if you already have the tools installed. If you don’t, no worries, we are going to describe step by step how to setup your environment for running React Native code.

If this is the first time you run a React Native app, please see the “Setting Up Your Development Environment” section at the end first, in order to install all the tools that are needed.

Running Our React Native Apps on Android

If you already have React Native and Node.js installed on your computer, simply follow these steps, in order:

  • Plug in your Android device or open an emulator
  • Open a Terminal window and run:
    cd ~/path/to/template
    npm install && react-native run-android

    Replace ~/path/to/template with the correct path to the folder where you extracted the archive downloaded from our server. To make sure you are in the right folder, you can run “pwd” to see the current path. It must be the folder with the template, otherwise the app won’t run.

That’s all. The app is now running on your Android device. If you need more details or help, read on.

Plug in an Android device or emulator

In order to run React Native apps on Android, you need an Android device or an emulator.

If you have an Android phone or tablet, simply plug it in. You might need to enable USB debugging in Device Settings, under Developer Tools. Follow the official Android documentation if you run into any issues.

Android emulators are bundled into Android Studio, so please install Android Studio, open it, go to Tools -> AVD Manager and start an emulator of your choosing:

react native android emulator

You can also create new emulators of your own, with your own hardware requirements.

Once you have an emulator up and running, proceed to the next step.

Run the React Native app

MacOS / UNIX

All you need to do is simply run the two commands we described above:

cd ~/path/to/template
npm install && react-native run-android

Alternatively, you can also use Visual Studio Code, which gives you a Terminal that’s directly located at the right folder. In that case, you can simply run “npm install && react-native run-android” and the app will just start.

Windows users

The command prompt on Windows is weird, so don’t use it. Instead, please install Visual Studio Code, which has a built-in Terminal that behaves exactly like the terminal on MacOS. Go to View -> Terminal to activate the Terminal:

visual studio code terminal

Please make sure you find the correct path of the folder where the template resides. Here’s an example of a commands sequence you can use as an example to locate the correct folder:

react native terminal

Setting Up Your Development Environment

Let’s see how you can set up your development environment in order to run React Native apps. The setup shouldn’t take more than 5 minutes.

What do you need to install?

  • Node (NPM) and React Native
  • (Optional) Android Studio
  • (Optional) Visual Studio Code

Alright, let’s see how we install all of these. Simply follow the next steps:

  • Install Node by following the official guide
  • Install & Configure React Native by following this guide, the React Native CLI version. DO NOT USE Expo CLI!!
  • Download & Install Android Studio (needed only if you don’t have a physical Android device)
  • Download & Install Visual Studio Code (recommended for developing React Native apps, especially on Windows, due to its powerful Terminal)

Looks simple, right? It actually is. This is all you need to do to run React Native apps on Android devices or emulators.

 

Shopping Cart