Hello, in this tutorial, you'll learn how to setup React Native on Windows for Android development.
Hello, in this tutorial, you'll learn how to setup React Native on Windows for Android development.
What is React Native?
React Native is an open source framework for building Android and iOS applications using React and the app platform’s native capabilities. You use JavaScript to access your platform’s APIs as well as to describe the appearance and behavior of your UI using React components.
Setup
Step 5:
Step 7:
Step 8:
Then click on the "Environment Variables..." button.
C:\Program Files\Java\jdk-17
Then click on the "Path" variable and click "Edit"
Copy the Android SDK path located in the SDK Manager.
Then add these inside the Path variable
Step 10:
Make sure Java is 11 or greater, node is 18 or later, and npm is 9 or greater.
java -version
node -v
npm -version
Create the Project and run on Emulator
Now that you have the environment setup, you can create your first React Native application and launch it on the emulator.
npx react-native@latest init myfirstreactnativeproject
Wait for he process the complete.
Step 2:
cd myfirstreactnativeproject
Step 3:
npx react-native run-android
You may get this error:
If you do, run this command and start the app again
npm i
That is all for the quick start guide on React Native. Now you can start using what you learn with React and build applications using the same syntax!