Setting up React Native on Linux Manjaro
isaaacme
Posted on November 12, 2020
React Native on Manjaro is really hard to setup.
And not because it is actually hard, but the information is scattered all over the web, in little and semi-outdated places. so as as a #semiLinuxNoob I've decide to write this guide for future me and others who would like to try using Linux and particularly an Arch based distribution on their main dev machine for React native. I'm on the xfce Version.
Step 01 Node & npm
You either add them on Pamac from the AUR or on terminal with the command pacman -S nodejs npm
and see their version node -v
and npm -v
Step 02 OpenJDK 8
Install Java
sudo pacman -S jre8-openjdk-headless jre8-openjdk jdk8-openjdk openjdk8-doc openjdk8-src
Step 03 Android Studio
Install it in Pamac from the AUR, and then open Android Studio, click on "Configure" button and select "SDK Manager".
Select the "SDK Platforms" tab from within the SDK Manager, then check the box next to "Show Package Details" in the bottom right corner. Look for and expand the Android 10 (Q) entry, then make sure the following items are checked:
- Android SDK Platform 29
- Intel x86 Atom_64 System Image or Google APIs Intel x86 Atom System Image.
Finally, click "Apply" to download and install the Android SDK and related build tools.
Next, Add the following lines to your $HOME/.bash_profile or $HOME/.bashrc (if you are using zsh then ~/.zprofile or ~/.zshrc) 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
Step 03 Watchman
Here, you can either go for the AUR or if you like you can install Hombrew and get it with brew install watchman
Step 04 Celebrate, We made it!
Step 05 VM Acceleration (optional)
This will improve system performance while you're using the Emulator rather than a Actual Device. Since it's not a short affair, I'll just link to the Original article on FOSSlinux
Conclusion
Hope this was helpful for you, and be sure to share this with a friend who develops on Windows or Ubuntu, and save them!
Posted on November 12, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.