Install React Native For Windows

Install React Native For Windows

React Native is a fully responsive mobile application development language that gives us the coding environment to code in JavaScript, HTML and CSS.

In this article,  we will see the proper installation of React Native on windows.

Step 1 : Install Required Software

For installing React Native on windows, we have to install the below software which is necessary to run our code and set up the environment.

NodeJS : We have to download and install the latest version of NodeJS software on our windows machine. You can install it from nodejs.org.

Python : Next, We have to install the latest version of Python from Python.org.

Step 2 : Install React Native

We can access the npm packages after installing NodeJS via the Command Line Interface(DOS) in our windows. Now, open command prompt in your machine to install React Native.

npm install –g react-native-cli

Step 3 : Install JDK(Java Development Kit

Now, Install the JDK in your machine from the official website oracle.com.

Step 4 : Install Android Studio and SDK Manager

Now, download the Android Studio latest version from Google Android Developers official site developer.android.com.

After installing Android Studio Goto Files ->  Settings.

Install Android Studio and SDK Manager

Goto Appearance and Behaviour -> System Settings -> Android SDK and now install the latest android platform.

Install Android Studio and SDK Manager

Step 5 : Adding Environment Variable ANDROID_HOME in windows

The React Native required the ANDROID_HOME variable to compile and run the applications. you have to define the ANDROID_HOME variable.

  1. Right click on My Computer.
  2. Goto Properties.
Adding Environment Variable ANDROID_HOME in windows
  • Click on Advanced System Settings.
Adding Environment Variable ANDROID_HOME in windows
  • Click on Environment Variables.
  • Under system Variables Click on New.
  • Set the name of the variable value the same as your SDK Manager’s path.

  • Now, your ANDROID_HOME variable has been successfully set.

Step 6 : Start Android Virtual Device(AVD)

  1. Firstly, the Android virtual device is mainly used to conclude the test result of your coding inside a virtual android machine is same as a real android phone. To set AVD open android studio -> Tools -> Android -> AVD Manager.
Start Android Virtual Device(AVD)
  • Click on the option Create New Virtual Device.
  • Now, select your device.
  • Now, Select Android OS Version System Image.
  • Name the AVD and hit Finish button
  • After creating AVD just hit the Run button to start AVD.

Step 7 : Create your first React Native project

After finishing all the installing, create a folder in your drive in which you are going to store all your React Native projects. Now, open command prompt and go inside the folder by using ‘cd’ command in your command prompt.

Type react-native init FirstProject and press the Enter.

Create your first React Native project
  • Now it will start downloading the React Native app support libraries from the internet.
  • The final output on the screen will be like the below picture.
  • Now we will build our created app and run it on the Android Emulator using the following command.

E:\>cd reactnativeprojects

E:\ReactNativeProjects>cd firstproject

E:\ReactNativeProjects\FirstProject>react-native run-android

  • Also, if the project you have done builds successfully then you will see a message on the command prompt screen BUILD SUCCESSFUL.

Congrats! Now, you can see your app builds successfully and run into the Android emulator. The emulator will look like the picture below.

Related Articles: Install React Native For Windows

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top