Installation
Read This on Github
⭐ How to install React Native?
Installation Guide
If you followed my react tutorial series, you already know how to install NodeJs. Still if you don't know how to install NodejS , React Extensions and VsCode, then you can check out the small guide tutorial here
- For React Native you need to install a IDE or Code Editor. I recommend you to use Visual Studio Code (opens in a new tab). It is a free and open source code editor. You can download it from here (opens in a new tab).
- You need to install Java (JDK) or OpenJDK. You can download it from here (opens in a new tab). For step by step guide, you can check out this tutorial.
- You need to install Android Studio. You can download it from here (opens in a new tab).
I know you are thinking that why we need to install Java and Android Studio. Because android studio behind the scene uses Java and Android SDK to run the app on your android device and that tools comes with Android Studio. And we need Android Debug Bridge (ADB) to connect our device with our computer. Additionally you can install but there are some components that missed out so simply install Android Studio.
If you open Android Studio, and click on more action button, you will see a option called SDK Manager and there you can see SDK tools where you can see Android Emulator, Android SDK Platform-Tools, Android SDK Build-Tools. These are the main tools that we need.
- If you are using Windows simple open environment variable and add the path of Android SDK.
Follow this steps to to set environment variable in windows
- Open the Start menu and type "Environment Variables" in the search bar.
- Click on "Edit the system environment variables."
- Click on the "Environment Variables" button.
- Scroll down to the "System Variables" section and find the "Path" variable.
- Click on the "Edit" button.
- Click on the "New" button and add the path to the Android SDK platform-tools folder. For example:
C:\Users\Username\AppData\Local\Android\Sdk\platform-tools
- Click on "OK" to save the changes and close all open windows.
- Open a new command prompt and type "adb" to verify that the installation was successful.
C:\Users\Username>adb
Android Debug Bridge version 1.0.32
Version 4797878
Installed as C:\Users\Username\AppData\Local\Android\Sdk\platform-tools\adb.exe
- Even you can check the version of adb by typing "adb version" in command prompt.
adb version
or
C:\Users\Username\AppData\Local\Android\Sdk\platform-tools\adb.exe version
- For installing react native ClI Right-click on Command Prompt and select Run as administrator.
choco install -y nodejs-lts microsoft-openjdk11
For Different OS you can follow the link : https://reactnative.dev/docs/environment-setup (opens in a new tab)