How to setup React Native Development Environment for Android development on windows
Tags: reactnative, react, mobiledevelopment, programming
Published: 2021-11-02 17:53:12

React Native is an open-source UI software framework created by Facebook, Inc. It is used to develop applications for Android, Android TV, iOS, macOS, tvOS, Web, Windows and UWP by enabling developers to use the React framework along with native platform capabilities. - Wikipedia

Software Required and their Links:-
Download all these software so that it will be an easy step wise process to install them one by one.

* Download latest version of **Node**:- [CLICK HERE](https://nodejs.org/en/)
* Download Java if not preinstalled on the system:- [CLICK HERE](https://www.java.com/en/download/)
* Download Android Studio:- [CLICK HERE](https://developer.android.com/studio)

Let's Start, follow all the steps carefully otherwise you may face errors

##Install Node
Download the latest version of node and install it. Open the exe file and follow the steps shown in the installation wizard.
![Node Install](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wfysize8ab9u51pkc7ut.png)
Once the installation is finished check if it successfully installed or not by running following command in cmd.
```javascript
node --version
```
![Node version](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ckmwo8mq04lji4gbkh31.png)
If you see the version as it is shown in the picture then node is installed successfully. **CONGO**. Still long way to go....

##Install Android Studio
Download the android studio setup exe from the above link and install it as follows
Download the exe file from here link given above
![Android Studio Download Website](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qndp89zlnjyrb7guccyx.png)
Click Next
![Components](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zr9c8027um6wb2oclb4u.png)
Don't change any components setting let it be default and click next. if Android Virtual Device is not selected then select it.
![Installing](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hzotodwqsklf4jj9hih4.png)
Let the installation finish
![Finished](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wq0atd421sy7g1clfook.png)
WOHOO! You have successfully installed the Android studio. Select Start android studio and click on finished.
![Welcome](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rjga8gtasd0iw5ltaypo.png)
Click Next
![Install Type](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mtwbmza5ltr7xphe7rhz.png)
Select standard installation type and click next.
![Download Emulator and SDK](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dnczmo32sqepanrclmo3.png)
Verify the installation directory and click on finish
![Verify install](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o718nu8m2yz9mqp48nbb.png)
It will download and install all the required sdk's.
![Sdk installation finished](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2jw2w66d8rini6o3bvfv.png)
## Installing SDK
After the Android Studio is started Click on More Action -> SDK Manager
![SDK Welcome Screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m8569ac0po2znd3towlt.png)

Check Android 10.0(Q) or whichever version of android you want the app to be compatible with. Android has backward compatibility that means the app will work on the older version of android look for android docs for more details.
![ss](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/flu7myy4vi8cz7ubdth6.png)
Choose SDK Tool tab and see if the following components are installed some tools may differ depending on the system. Important one is the Android Emulator.
![ss](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3uac6l092evh0ncdpivr.png)
After this click on Apply and Accept all the licenses and let the installation finish.
##Install Android Emulator
Click on the AVD Manager to install Virtual Android Emulator
![SDK Welcome Screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m8569ac0po2znd3towlt.png)
Click on Create Virtual Device
![ss](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t38h7qvkvfosh2dx8wby.png)
On the next screen select the device you want to install. You can choose any.
![ss](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eua5kb982jbeoet3fhny.png)
On the next screen select the SDK you installed in the previous step.
![ss](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qa5ogf76o2ah9cj9nk11.png)
Verify the details if you want to change the name you can do that as well after verifying click on finish and let the download and installation finish. It might take some time depending on the speed of the internet.
![ss](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ttty689uiqrehvwlpjy.png)
##Configure the ANDROID_HOME environment variable
The React Native tools require some environment variables to be set up in order to build apps with native code.

1.Open the Windows Control Panel.
2.Click on User Accounts, then click User Accounts again
3.Click on Change my environment variables
4.Click on New... to create a new ANDROID_HOME user variable that points to the path to your Android SDK:
OR
On search box type env and select the edit environment variable option.
![Env](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tptd45keksp01f5dtnro.png)
In the user variable section click on new and add the details as below change the directory of SDK depending on where you have installed the SDK.
![ss](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o87y7ik5ul8qy8q4nxao.png)
![ss](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wmci54lhcjxf4zkufck4.png)
Click OK and select Path from the section and click on new. Add the platform-tool directory as below. It might be different depending on where you have installed you SDK's. 
![Envs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u6kq0qrhqh49v8udaewm.png)

CONGRATULATIONS!!!!! You have successfully installed React native. In the next blog we will see how to make our first program in react native and run it on a virtual emulator.

If you are facing any issues or error do write them in comment I will be happy to help. Thank You.