How to install NativeScript to build Native IOS and Android Mobie Applications ? - SpartaCode

SpartaCode

Make your development faster and easier !

How to install NativeScript to build Native IOS and Android Mobie Applications ?

What is NativeScript :
It is open source mobile framework. By using NativeScript we can build truly native iOS and Android mobile apps. 
You can get 100% native API access with Javascript, TypeScript or Angular.

Requirements of NativeScript :
  • Latest copy of Java installed on System.
  • Installing Android Studio can be a benefit.

Installing NativeScript :
To install NativeScript use following steps :

Step 1: Install latest Node.js 
Download and install Node JS from following website :
Step 2: Install NativeScript CLI
Open Terminal or Command Prompt and type in following command :

npm install -g nativescript
After Installation we have tns (Telerik Native Scrpt) command on our terminal.

Step 3: Including Android SDK
To run Android projects we require android sdk to be installed on our system. If you already have android studio installed its great. You can use sdk in android studio to run NativeScript Project.
This is the most important part of installation of NativeScript do it carefully you will succeed.
To include android sdk do the following :
On Windows :
  1. Click on Start
  2. Right click on My Computer
  3. Select Properties
  4. If you are in Windows 7 click on Advanced system settings
  5. System Properties Dialog box opens up
  6. Click on Enviornment Variables
  7. Enter ANDROID_HOME path as your Android SDK path as shown in below images
1.  Advanced System Settings :

2. Environment Variable :

3. Android Home path of SDK :

4.Check whether Java Path is correctly installed :

Step 4: Check whether NativeScript Installed Successfully
To check NativeScript is installed correctly with all aspect we need to run this command on our terminal/ command prompt.
tns doctor
If this command returns error please check the SDK location and Java home is correctly specified in enviornment variable.
Java home is shown in following image :

Once you have installed successfully you will find this output on your terminal after tns doctor command and yeh! you are ready to make great mobile applications. Congratulations !


Thank you.
If you installed nativescript using this tutorial please like, share and comment.

No comments:

Post a Comment

News

Get Amazing Traffic to your Site

Traffic Exchange

Post Bottom Ad

Responsive Ads Here