Running a React Native App in an Android Emulator Without Expo

Victor Burnett
2 min readJan 5, 2019

--

If an Android Virtual Device is not set up and running, follow the instructions for creating and starting an Android emulator in my other story.

(1) If you have installed React Native and its dependencies and have an Android Virtual Device running using the environment created in this story, then navigate to your desired directory in Command Line and create a project:

>react-native init MyProject

(2) A successful project creation will be followed by:

To run your app on iOS:
cd C:\Users\user\ReactNativeApps\MyProject
react-native run-ios
- or -
Open ios\MyProject.xcodeproj in Xcode
Hit the Run button
To run your app on Android:
cd C:\Users\user\ReactNativeApps\MyProject
Have an Android emulator running (quickest way to get started), or a device connected
react-native run-android

(3) Open a text editor and copy-paste into it:

sdk.dir = C:\\Users\\USER\\AppData\\Local\\Android\\Sdk

and editing it by replacing USER with your username.

NOTE: If your Android SDK is located somewhere else, use that path instead. Be sure to use the ‘\’ escape character for the back-slashes in your filepath.

Save this file as local.properties in the /android/ sub-directory of your project folder with the All Files file-type setting, not .txt!

(4) Now run..

>react-native run-android

This should load a separate window for the node Metro Bundler. If you have an android emulator launched, an Android Alien icon with your React Native app name should appear:

--

--