Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to Set Up React Native on Windows

Install the JDK and Node.js, create a React Native project and get ready to run it on Android.

Windows Hosting2 min read4 steps8 screenshots

Step 1: Install the JDK

React Native for Android needs a Java Development Kit (JDK), version 17 for current releases. Download and install it (for example the Microsoft Build of OpenJDK or Temurin).

Downloading the Java Development Kit

Check it:

java -version
The Java version

Step 2: Install Node.js and npm

Download the LTS version from nodejs.org and run the installer.

Downloading Node.js

During setup you can tick the option to install the tools needed for native modules (Python and Visual Studio Build Tools).

Installing the tools for native modules

Check:

node -v
npm -v
The Node.js and npm versions

Step 3: Install React Native tooling

The old global react-native-cli is deprecated. The current way is to run the CLI with npx, and no global install is needed. If your guide asks for the old CLI:

npm install -g react-native-cli
Installing the React Native CLI

Step 4: Create a project

npx @react-native-community/cli init Testproject

(The old command npx react-native init Testproject no longer works on new versions.)

Creating the test project

Step 5: Set up Android

  1. Install Android Studio. During setup tick Android SDK, Android SDK Platform and Android Virtual Device.
  2. Set the environment variable ANDROID_HOME to the SDK folder (usually C:\Users\<you>\AppData\Local\Android\Sdk).
  3. Add %ANDROID_HOME%\platform-tools to the Path variable.
  4. Create an emulator in the Device Manager, or connect a phone with USB debugging turned on.

Step 6: Run the app

cd Testproject
npx react-native start

In a second terminal:

npx react-native run-android

The default screen "Welcome to React Native" appears on the emulator or phone.

The Welcome to React Native screen

Quick recap

  • Install the JDK, Node.js and Android Studio.
  • Create a project with the community CLI and run it with run-android.