React Native on Ubuntu

Some tips and suggestions for starting up Real Native development on Ubuntu Linux 16.04.

Tooling installation

All the instructions in this section must be executed only once per computer.

Install android studio and sdk

https://developer.android.com/studio/index.html

Configure Simulator (Android Virtual Device AVD), create Virtual Device Nexus 6 Api 24.

Start the Android Studio and create and AVD in:

Tools > Android > AVD Manager

Verify the created Simulator name required later to start it from command line:

cd ~/Android/Sdk/tools

./bin/avdmanager list avd

Install Nodejs and Node Package Manager

sudo apt-get install nodejs

sudo apt-get install npm

Install React Native

npm install -g create-react-native-app

Install the Atom Editor

apt-get install atom

Install syntax validator in Atom just once

apm install linter

apm install linter-eslint

Create project & configure Atom

All the instructions in this section must be executed only once per project.

mkdir $HOME/workspace

cd $HOME/workspace

react-native init myproject

cd myproject

npm install --save-dev eslint-config-rallycoding

# Create eslint configuration file .eslintrc

cat<<EOF>.eslintrc

{

"extends": "rallycoding"

}

EOF

Startup programming environment

All the instructions in this section must be executed every time you need to startup your development environment.

Start android emulator

cd ~/Android/Sdk/tools; ./emulator -avd Nexus_5X_API_24

Start packager

cd $HOME/workspace/myproject

react-native start

Start project

cd $HOME/workspace/myproject

react-native run-android

Montitor react native logs

cd $HOME/workspace/myproject

react-native log-android

Startup Atom

cd $HOME/workspace/myproject

atom .

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos necesarios están marcados *

Puedes usar las siguientes etiquetas y atributos HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>