Setting Up React native android without Android Studio

Achmad Fatoni
SurabayaDev
Published in
2 min readMay 28, 2017

I’m just start learning React native by just following getting started, when i setting up Android development environment it’s require me to install Android Studio then i was thinking Why i need to install Android Studio? i don’t want to code in java then i looking for alternative whether i can use react native android without android studio or not.

I’m using a mac, so this article will explain how to set up react native android in a mac environment.

I found this article, i rewrite the article using brew only when install dependencies using brew , here’s how:

Prerequisite:

Step 1: Install Android SDK

Before you install android SDK you need to add your android sdk path to .bashrc or .zshrc, this path will used during installation.

export ANDROID_HOME=/usr/local/share/android-sdk

Install android sdk by typing code below in your terminal

brew cask install android-sdk

this operation will take some time depending on your internet connection, please be patient.

Step 2: Install required SDK

React native require android 6.0 (Marshmallow) to work with

  • Android 6.0 (Marshmallow) SDK (platform 23)
  • Android build tool 23.0.1
  • Google APIS

Install those required package via terminal

sdkmanager "platforms;android-23" "build-tools;23.0.1" "add-ons;addon-google_apis-google-23"

Step 3: Test installation

Create demo project

react-native init DemoProject
cd DemoProject

You can run demo project on your android phone or alternatively in android emulator using genymotion

Run on phone:

Plug in android phone (don’t forget to enable usb debugging)

react-native run-android

Run on genymotion

  1. install genymotion if you haven’t
brew cask install genymotion

2. Set custom android sdk on genymotion Setting → ADB, set value to :

/usr/local/share/android-sdk

3. Add new virtual device then run it

4. run react-native android command on your terminal, react native app will appear on your genymotion emulator

react-native android

source : https://medium.com/skyshidigital/install-react-native-without-android-studio-366317419e7e

--

--