Codementor Events

React Native Installation Guide for Beginners

Published Feb 28, 2025
React Native Installation Guide for Beginners

Welcome to this beginner-friendly guide on learning React Native from scratch. Through this series, we will be building a demo application step by step. If you haven't watched the demo of the application yet, I recommend checking out my previous video, where I showcase the app's functionality and features.

Step 1: Installing React Native and Android Studio

Before we dive into development, the first step is setting up React Native and Android Studio. Let's get started!

1. Downloading and Installing React Native

Open Google Chrome and search for React Native Create New App.
Click on the first link that appears.
You will be redirected to the official React Native documentation page, where you can find all the steps to install React Native.

Two Ways to Install React Native

React Native can be installed in two ways:

Expo

React Native CLI (Command Line Interface)

Both methods work fine, but I prefer React Native CLI.

Scroll down and choose your OS (Windows) and target platform (Android).

2. Installing Node.js and JDK

To install Node.js and JDK, follow these steps:
First, install Chocolatey (a package manager for Windows)
Open PowerShell as an administrator.
Run the following command:

Get-ExecutionPolicy

If you get a Restricted error, run:

Set-ExecutionPolicy AllSigned

Now, install Chocolatey:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

Verify the installation by running:

choco -?

Install Node.js and JDK using Chocolatey:

choco install -y nodejs-lts openjdk11

3. Installing Android Studio

Open the Android Studio download page and install it.
Follow the on-screen instructions:

  • Click Next → Next → Install.
  • Once installed, open SDK Manager.

Installing Required SDK Tools
Navigate to More Actions > SDK Manager.
Under SDK Platforms, select Android 11.
Under SDK Tools, install:

  1. Intel x86 Emulator Accelerator
  2. Android SDK Command Line Tools
  3. Android SDK Platform Tools

Setting Up an Emulator
Go to More Actions > Virtual Device Manager.
Click Create Device and select a device with Google Play Store support.
Choose API level R (Android 11) and click Finish.

4. Setting Environment Variables

Search for Environment Variables in Windows.
Click New and add:
Variable Name: ANDROID_HOME
Variable Value: C:\Users\YourUsername\AppData\Local\Android\Sdk

5. Creating a New React Native Project

Open Command Prompt (CMD) and install React Native CLI:

npm install -g react-native-cli

Navigate to the desired location and create a new project:

npx react-native init MyFirstApp

6. Running Your React Native App

Navigate to the project folder:

cd MyFirstApp

Run the app on an emulator:

npx react-native run-android

Discover and read more posts from Prashant Gosai
get started