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.
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
sudo pacman -S jre8-openjdk-headless jre8-openjdk jdk8-openjdk openjdk8-doc openjdk8-src
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
Here, you can either go for the AUR or if you like you can install Hombrew and get it with
brew install watchman
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
Hope this was helpful for you, and be sure to share this with a friend who develops on Windows or Ubuntu, and save them!