Install React Native on Linux

Quick Install React Native on Linux


Basically react native is a framework of Javascript that has been developed by large companies in technology such as Facebook. So, with react native you don't need to make a hybrid application. In addition, react native is able to compile applications into a native code on Android or iOS.

In this tutorial i will share how to install React Native Quicly in Linux Enviroment.

 

1. first you need to install nodejs & npm

#apt install nodejs npm

 

2. After installation you can check version nodejs & npm

#node -v

v10.20.1

 

#npm -v

6.14.5

 

3. install openjdk with following command below

#apt install openjdk8

 

4. install react native with following command below

#npm install -g react-native-cli

 

5. Next step, you must setting Android SDK enviroment. I assume you already have android SDK. Or you can install Android Studio first.

#nano ~/.bash_profile

export ANDROID_HOME=/home/aulian/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

 

After add ANDROID_HOME, Follow command below to reload setting Android SDK Enviroment

#source ~/.bash_profile

 

check Android SDK enviroment

aulian@technotes:~$ adb

Android Debug Bridge version 1.0.41

Version 29.0.6-6198805

Installed as /home/aulian/Android/Sdk/platform-tools/adb

 

global options:

 -a         listen on all network interfaces, not just localhost

 -d         use USB device (error if multiple devices connected)

 -e         use TCP/IP device (error if multiple TCP/IP devices available)

 -s SERIAL  use device with given serial (overrides $ANDROID_SERIAL)

 -t ID      use device with given transport id

 -H         name of adb server host [default=localhost]

 -P         port of adb server [default=5037]

 -L SOCKET  listen on given socket for adb server [default=tcp:localhost:5037]

 ..

 ..

 

7. Now you can install first project react native with follow this command

#react-native init <name_project>

 

8. After Installation finish, move to directory project

#cd <name_project>

 

9. open project. In this tutorial i use visual studio code

#code .

 

10. running project with type follow this commnad below

#react-native run-android

Install Rect native Quickly on Linux

 

Thankyou and See u on next Tutorial :))

Post a Comment

Previous Post Next Post