1. Node
2. Java Development Kit (JDK)
3. Android studio
Follow the installation instructions to install Node
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
sudo apt-get install -y nodejs
React Native requires version 8 of the Java SE Development Kit (JDK).
Go through the link given below to install JDK.
https://www.javahelps.com/2015/03/install-oracle-jdk-in-ubuntu.html
1.Download Android studio from https://developer.android.com/studio/index.html
Choose a "Custom" setup when prompted to select an installation type. Make sure the boxes next to all of the following are checked:
- Android SDK
- Android SDK Platform
- Android Virtual Device
2.Download Android SDK
React native app requires the Android 9 (Pie) SDK
"Welcome to Android Studio" screen -> Configure -> SDK Manager -> SDK Platforms -> check Show Package Details
Check the box and install following things
- Android SDK Platform 28
- Intel x86 Atom_64 System Image or Google APIs Intel x86 Atom System Image
3.Configure the ANDROID_HOME environment variable
Add the following lines to your .bashrc config file:
- export ANDROID_HOME=$HOME/Android/Sdk
- export PATH=$PATH:$ANDROID_HOME/emulator
- export PATH=$PATH:$ANDROID_HOME/tools
- export PATH=$PATH:$ANDROID_HOME/tools/bin
- export PATH=$PATH:$ANDROID_HOME/platform-tools
npx react-native init ProjectName
Prepare the Android device using https://facebook.github.io/react-native/docs/running-on-device
cd ProjectName
npx react-native run-android