Here are the steps for getting a working Linux install for React Native:
- Install Java SDK
-
Install KVM
sudo apt-get install qemu-kvm libvirt-bin bridge-utils virt-manager
sudo adduser $USER libvirtd
virsh -c qemu:///system list
should show you an empty list.
-
Install the Android SDK
- Download here or use
cd ~ && wget https://dl.google.com/dl/android/studio/ide-zips/2.3.2.0/android-studio-ide-162.3934792-linux.zip
- Run
unzip android-studio-ide-162.3934792-linux.zip
- Run
cd cd android-studio/
- Run
./bin/studio.sh
and follow the installer instructions - After it finishes installing, you'll have an Android folder in your home directory.
- Create the following entries in your ~/.bashrc or ~/.zshrc
export ANDROID_HOME=/home/$USER/Android/Sdk
alias android='/home/$USER/Android/Sdk/tools/android'
- reload your shell
Tip: To make Android Studio available in your list of applications, select Tools > Create Desktop Entry from the Android Studio menu bar.
Required libraries for 64-bit machines: If you are running a 64-bit version of Ubuntu, you need to install some 32-bit libraries with the following command:
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
If you are running 64-bit Fedora, the command is:
sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686
- Continue to step 4 in the official guide
-
sudo npm install -g react-native-cli
-
export PATH=${PATH}:${ANDROID_HOME}/tools && export PATH=${PATH}:${ANDROID_HOME}/platform-tools