- For Development Purpose using NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
- Close and Open Terminal again, verify NVM version
$ nvm -v
Node Version Manager (v0.35.3)
- Install NodeJS LTS (v12)
nvm install lts/erbium
- Verify NodeJS and NPM Version
$ nvm ls
-> v12.18.3
default -> lts/erbium (-> v12.18.3)
node -> stable (-> v12.18.3) (default)
stable -> 12.18 (-> v12.18.3) (default)
iojs -> N/A (default)
unstable -> N/A (default)
lts/* -> lts/erbium (-> v12.18.3)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.22.0 (-> N/A)
lts/erbium -> v12.18.3
$ node -v
v12.18.3
$ npm -v
6.14.6
- Install default JDK/JRE
sudo apt install default-jdk
sudo apt install default-jre
- Verify Version Java
$ java --version
openjdk 11.0.8 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+10-post-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 11.0.8+10-post-Ubuntu-0ubuntu120.04, mixed mode, sharing)
- Setup
JAVA_HOME
$ echo 'export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"' >> ~/.bashrc
$ source ~/.bashrc
$ echo $JAVA_HOME
/usr/lib/jvm/java-11-openjdk-amd64
- Make sure, your cpu support KVM Module
$ sudo apt-get install cpu-checker
$ egrep -c '(vmx|svm)' /proc/cpuinfo
8
$ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
- Install KVM Module
sudo apt-get install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils
- Install Require Package (Ubuntu 64-bit) SOURCE :
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
- Download Android Studio From HERE
- Ekstrack in Home Directory
/home/username/android/android-studio
$ ll
total 64
drwxrwxr-x 7 yadi yadi 4096 Jun 29 17:40 ./
drwxrwxr-x 3 yadi yadi 4096 Sep 13 15:28 ../
drwxrwxr-x 4 yadi yadi 4096 Jun 29 17:40 bin/
-rw-r--r-- 1 yadi yadi 25 Jun 25 09:51 build.txt
-rw-r--r-- 1 yadi yadi 1945 Jun 25 09:51 Install-Linux-tar.txt
drwxrwxr-x 6 yadi yadi 4096 Jun 29 17:40 jre/
drwxrwxr-x 4 yadi yadi 12288 Jun 29 17:40 lib/
drwxrwxr-x 2 yadi yadi 4096 Jun 29 17:40 license/
-rw-r--r-- 1 yadi yadi 11352 Jun 25 09:51 LICENSE.txt
-rw-r--r-- 1 yadi yadi 396 Jun 25 09:51 NOTICE.txt
drwxrwxr-x 49 yadi yadi 4096 Jun 29 17:40 plugins/
-rw-r--r-- 1 yadi yadi 340 Jun 25 09:51 product-info.json
- Execute File
bin/studio.sh
, example:
yadi@yadi-desktop:~/android/android-studio/bin$ ./studio.sh
- After installation finished, Add sdk to
.bashrc
, in my default installation, all android sdk in~/Android/Sdk
:
$ echo 'export ANDROID_HOME="$HOME/Android/Sdk"' >> ~/.bashrc
$ echo 'export PATH="$PATH:$ANDROID_HOME/emulator"' >> ~/.bashrc
$ echo 'export PATH="$PATH:$ANDROID_HOME/tools"' >> ~/.bashrc
$ echo 'export PATH="$PATH:$ANDROID_HOME/tools/bin"' >> ~/.bashrc
$ echo 'export PATH="$PATH:$ANDROID_HOME/platform-tools"' >> ~/.bashrc
$ source ~/.bashrc
npm install react-native-cli -g
// or
yarn global add react-native-cli
react-native init myApp
cd myApp
# start build
react-native start
# for android
react-native run-android
# for ios
react-native run-ios
Enjoy!
It's work for me:
genymotion
ubuntu 20.04
Thanks