How to Build React-Native environment

We get a new topic today, that is to build a native mobile app using javascript. Two frameworks are recommended: React Native / Native Script. Cause I have do some research on react, I choose react native to build an android application.

It takes 3 hours to get the environment ready, all the steps and focal points are listed here.

Step 1 : Install basic environment

1. Git

2.  Java JDK

3. Android SDK

Step 2 : Define Environment Variables


JAVA_HOME:  C:\Program Files\Java\jdk1.8.0_77                   (JDK Path)
PATH: %JAVA_HOME%/bin;%JAVA_HOME%/jre/bin;

tips: remember to use ‘java -version’ and ‘java’ to test whether java environment is ok.


ANDROID_HOME : C:\Users\Cyrus_Cai\AppData\Local\Android\sdk      (Android SDK path)

PATH: %ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools;

Step 3 : Configure SDK

  1. Find Android manager ( Android SDK path)
  2. Make sure that the listed items are selected:
    • Android SDK Build-tools version 23.0.1
    • Android 6.0 (API 23)
    • Local Maven repository for Support Libraries (this is called Android Support Repository in older versions)


Step 4 : Install Genymotion

Genymotion: an emulators which is easier to set up than stock. More research is needed on  Genymotion actually.

We can get Genymotion here


1. down individual version( it’s free)

2. VirtualBox is needed to set up Genymotion, if we haven’t installed it, we can download a with virtualBox version.


3. After installing Genymotion and virtualBox, remember to add a new virtual device and try to run it. This will help us to test whether android platform is ready or not (I guess).


Step 5 : Use gradle deamon

React Native Android use gradle as a build system. It is recommend to enable gradle daemon functionality which may result in up to 50% improvement in incremental build times for changes in java code.

site :

how to : copy this command and run it in ‘command line’

(if not exist “%USERPROFILE%/.gradle” mkdir “%USERPROFILE%/.gradle”) && (echo org.gradle.daemon=true >> “%USERPROFILE%/.gradle/”)



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s