# How to Install React Native on Windows

You have heard about the wonders of React Native and how it can help you ship native code for both Android and IOS using the same codebase. And that's why you're here today - to learn how to get started.

Luckily, not long ago I was just like you, so I decided to document my experience in order to help you.

### Prerequisites

You need to have Node, JDK, and Android Studio installed. Follow me as I show you how to install them.

### Installing Node

Please visit the official [website](https://nodejs.org/en/) to download and install Node version 14 or newer. The current LTS version as of the time of writing this article is Node 18.

### Installing JDK

JDK is short for Java Development Kit, and it offers a collection of tools and libraries necessary for developing Java applications.

I recommend using [Chocolatey](https://chocolatey.org/) \- a very popular package manager for Windows - to install the JDK. Please see this very simple and straightforward [installation guide](https://chocolatey.org/install#individual) to have it installed on your Windows machine.

After successfully installing [Chocolatey](https://chocolatey.org/), please run the command below to install the JDK11. We are using JDK11 because we are likely to encounter issues with newer versions.

```bash
choco install -y microsoft-openjdk11
```

Now let's make sure that we have successfully installed the JDK by running the command below. Please note that you may need to restart the command prompt and "Run as administrator".

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1678455045612/1eac735a-c145-48bb-a163-57934d3ade20.png align="center")

If you encounter a problem where the command is not working, please go to your environment variables and edit the System Variables which can be found in the steps below ☟

1. Open the **Windows Control Panel.**
    
2. Click on **User Accounts**
    
3. Click **User Accounts** again
    
4. Click on **Change my environment variables**
    

Add the `JAVA_HOME` variable with the value set to the path for the Java executable. Java is typically installed (on Windows) as `C:\Program Files\Java\jdk<version>`.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1678456642311/62185c2f-b91e-48eb-ac5b-a06a6ffa7538.png align="center")

Now restart the command prompt and run the `java --version` command again.

### Installing Android Studio

We will not be making use of Android studio for development, however, we need to install it as an easy way to set up the necessary tooling to build our React Native app for Android.

Head over to the [Android Studio](https://developer.android.com/studio) website to download and install the latest version 😎. The installation is actually very straightforward.

During the installation of Android Studio, confirm that the boxes next to each of the following items are checked:

* `Android SDK`
    

* `Android SDK Platform`
    
* `Android Virtual Device`
    

**Add ANDROID\_HOME to Environment Variables**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1678457137611/50a3d5fe-c0cc-4472-a503-044eaa0b5a39.png align="center")

Next, run the `adb --version` command to ensure that everything is fine ☟

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1678457324171/d9793a92-123f-4e26-95ba-3f86c0561e9a.png align="center")

If you have gotten to this point, it means that everything is fine. Yaay 👏

Now we can run the command below to create a new project

```bash
npx react-native init projectName
```

That would be all for today. If you found this article helpful please share it🙏🏻.
