Node.js. The installer should set the C:/Program Files/nodejs/bin directory in windows PATH environment variable by default if is not you have to set the PATH. Restart any open command prompts for the change to take effect.

Make sure node and npm are installed by typing the below commands

node -v

npm -v

React native:

After installing the node in your system, you can install react native by typing the following command in the terminal

npm install -g react-native-cli

Android Development Environment:

Android studio helps you to run the react native app in an emulator and test the app. The installation process of the Android studio is explained below.

Specify the RAM to the Android emulator. By default, this should be 512 MB.

Finally, it extracts the packages to the local machine and will take some time to complete. Post the extraction, click the finish button and it will open the Android studio project with Welcome to Android studio message.

To create Android virtual Device:

Open the Android Studio and launch the AVD Manager clicking the AVD_Manager icon. Click the create a new virtual device and configure the device specification.

After clicking the finish button it will list the devices like in the above window.You can run the device by clicking the run button

Set up the ANDROID_HOME environment variable:

To run the react native app in emulator you need to setup the ANDROID_HOME environment variable

To setup the environment, right click on Computer → Advanced System Settings → Environment variables → New, then enter the path to your Android SDK.

Restart the Command Prompt to apply the new environment variable.

Create the First React native Project

We will create our first project by running the below command in the terminal from the folder where we want to create the app.

react-native init MySampleApp

Go to that folder,

cd MySampleApp

run the command to start package, make sure you started the emulator.

react-native start

react-native run-android

The sample project will be opened in the emulator.

React Native setup for ubuntu

First, you’ll need to install the node on your machine. If you already have node js skip the node installation steps, otherwise follow the below steps.

Node JS Installation:

We should refresh our local package index first by typing,

sudo-apt-get update

After that, you can install node js by using the command given below

sudo apt-get install nodejs

In most cases you’ll also need to install npm, you can install this by

sudo apt-get install npm

Make sure node and npm are installed by typing the below commands

node -v

npm -v

If you see the version in the terminal, then the node is installed successfully. My node version is 4.2.6 and npm version is 3.5.2

React Native CLI Installation:

After installing node js, run the below command in terminal:

npm install -g react-native-cli

Make sure react-native-cli is installed by typing,

react-native -v

This will give you the version details like,

react-native-cli:2.0.1

react-native: n/a – not inside a React Native project directory

The second one (react-native: n/a – not inside a React Native project directory) is nothing but you aren’t inside the react-native project folder, this is not an issue now, we can install it later.

Android Development Environment:

Android studio helps you to run the react native app in an emulator and test the app. The installation process of android studio is explained below

Choose Custom installation when running, make sure the boxes next to the below components are checked:

Android SDK

Android SDK Platform

Android Virtual Device

Click “Next” to install all of these components, then configure VM acceleration on your system.

Install the Android 6.0 (Marshmallow) SDK

When you install Android studio, by default it installs the most recent Android SDK. But React Native requires the Android 6.0(Marshmallow) SDK. So launch the SDK Manager and click on “Configure” in the Android Studio project screen.

1.Go to the settings menu and expand system settings under Appearance & Behaviour.

About us

Habile Technologies brews innovation and offers the perfect mix of technology, competitive business edge and strategy. With a proven track record of happy clients, we are proudly the best technology partner for your organisation.

how can we help you?

Tell us about your requirement and we’ll offer you the best possible solution. Get in touch now.

Habile Technologies - A digital technologies services and products company with more than 9 years of solid experience. Habile Technologies leverages it technical expertise to help clients outperform competition and be a leader in the innovation curve.