In this article, we will see the proper installation of React Native on windows.
Step 1 : Install Required Software
For installing React Native on windows, we have to install the below software which is necessary to run our code and set up the environment.
NodeJS : We have to download and install the latest version of NodeJS software on our windows machine. You can install it from nodejs.org.
Python : Next, We have to install the latest version of Python from Python.org.
Step 2 : Install React Native
We can access the npm packages after installing NodeJS via the Command Line Interface(DOS) in our windows. Now, open command prompt in your machine to install React Native.
npm install –g react-native-cli
Step 3 : Install JDK(Java Development Kit
Now, Install the JDK in your machine from the official website oracle.com.
Step 4 : Install Android Studio and SDK Manager
Now, download the Android Studio latest version from Google Android Developers official site developer.android.com.
After installing Android Studio Goto Files -> Settings.
Goto Appearance and Behaviour -> System Settings -> Android SDK and now install the latest android platform.
Step 5 : Adding Environment Variable ANDROID_HOME in windows
The React Native required the ANDROID_HOME variable to compile and run the applications. you have to define the ANDROID_HOME variable.
- Right click on My Computer.
- Goto Properties.
- Click on Advanced System Settings.
- Click on Environment Variables.
- Under system Variables Click on New.
- Set the name of the variable value the same as your SDK Manager’s path.
- Now, your ANDROID_HOME variable has been successfully set.
Step 6 : Start Android Virtual Device(AVD)
- Firstly, the Android virtual device is mainly used to conclude the test result of your coding inside a virtual android machine is same as a real android phone. To set AVD open android studio -> Tools -> Android -> AVD Manager.
- Click on the option Create New Virtual Device.
- Now, select your device.
- Now, Select Android OS Version System Image.
- Name the AVD and hit Finish button
- After creating AVD just hit the Run button to start AVD.
Step 7 : Create your first React Native project
After finishing all the installing, create a folder in your drive in which you are going to store all your React Native projects. Now, open command prompt and go inside the folder by using ‘cd’ command in your command prompt.
Type react-native init FirstProject and press the Enter.
- Now it will start downloading the React Native app support libraries from the internet.
- The final output on the screen will be like the below picture.
- Now we will build our created app and run it on the Android Emulator using the following command.
- Also, if the project you have done builds successfully then you will see a message on the command prompt screen BUILD SUCCESSFUL.
Congrats! Now, you can see your app builds successfully and run into the Android emulator. The emulator will look like the picture below.
Related Articles: Install React Native For Windows
- Benefits of Using Angular for Web Development 2021
- Difference Between C vs C++ vs Python vs Java
- KALI Linux Not Prefer Software Development Ubuntu
- Angular 12 Performance Benchmark Install Features
- Setup Angular 12 vs 11 vs 10 features benchmark
- How to Write Business Proposal for Client with Sample Format
- Top 10 Best Coolest Movies Chris Hemsworth of all time
- How to install wordpres on local machine like window 10 linux and Mac – Click here
- C vs C++ Difference Between C vs C++ vs Python vs Java
- Who is the strongest character in Naruto
- Top 10 Penny Stocks Invest 2021 Higher Return in 2025 2030