how to install nativescripts required tools and softwares.

Step 1: Install Node.js

The NativeScript CLI is built on Node.js, and as such you need to have Node.js installed to use NativeScript.
To check whether you have Node.js installed, open a terminal or command prompt and execute node --version. If there is an error, head to https://nodejs.org/ and download and install the latest “LTS” (long-term support) distribution and restart your terminal or command prompt.

Step 2: Install the NativeScript CLI

Open your terminal or command prompt and execute the following command to install the NativeScript CLI from npm, which is the Node.js package manager:
npm install -g nativescript
After the installation the system setup should have:
  • The latest stable official release of Node.js (LTS) 8.x
  • Google Chrome
  • JDK 8
  • Android SDK
  • Android Support Repository
  • Google Repository
  • Android SDK Build-tools 28.0.3 or a later stable official release
  • Android Studio
  • Set up Android virtual devices to expand your testing options
The two environment variables JAVA_HOME and ANDROID_HOME are required for Android development, which should have been automatically added as part of the installation:
step3: download android studio
step4:jdk installation
https://www.ntu.edu.sg/home/ehchua/programming/howto/JDK_HowTo.html
install jdk tar.gz file
in terminal   cd Downloads/
1.  tar -zxvf jdkfilename.tar.gz (extracted file will genrates)
move extracted file to /usr/lib/java/
2. cd /usr/lib/
3.sudo mkdir java
4. cd java/
5.cd ~/Downloads/
6.sudo mv jdk.1.8.0.11/ /usr/lib/java/
7.cd /usr/lib/java/jdk.1.8.0.11   (in java folder jdk.1.8.0.11 folder should be there)
8.sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/java/jdk1.8.0_221/bin/java" 1
9.sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/java/jdk1.8.0_221/bin/javac" 1
10.sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/java/jdk1.8.0_221/bin/javaws" 1
11. cd .. (clear the directory)
12. sudo gedit ./bashrc
add this in bashrc file and save it
#JAVA HOME directory setup
export JAVA_HOME=/usr/lib/java/jdk1.8.0_221
export PATH="$PATH:$JAVA_HOME/bin"
13 javac
14.java -version
step4:  how to install gradle on ubuntu
Download Gradle 
– To download the latest version of Gradle, visit the Gradle releases page. Use the wget command to download Gradle zip file in the /tmp directory:
$ wget https://services.gradle.org/distributions/gradle-5.2.1-bin.zip -P /tmp
– Once the download is completed, extract the zip file in the /opt/gradle directory:
$ sudo unzip -d /opt/gradle /tmp/gradle-*.zip

 Setup environment variables

– To configure the PATH environment variable to include the Gradle bin directory. create a new file named gradle.sh inside of the /etc/profile.d/ directory as below.
sudo nano /etc/profile.d/gradle.sh
add the
export GRADLE_HOME=/opt/gradle/gradle-5.2.1
export PATH=${GRADLE_HOME}/bin:${PATH}
above lines and save the file using enter
$ sudo vi /etc/profile.d/gradle.sh
export GRADLE_HOME=/opt/gradle/gradle-5.2.1
export PATH=${GRADLE_HOME}/bin:${PATH}
$source /etc/profile.d/gradle.sh

Verify the Gradle installation

– To verify if Gradle is installed properly use the gradle -v command which will display the Gradle version:
install angular
npm install -g @angular/cling new my-dream-appcd my-dream-appng serve
set environmental variables
in .bashrc file in home (ctrl+h)
#JAVA HOME directory setup
export JAVA_HOME=/usr/lib/java/jdk1.8.0_221
export PATH="$PATH:$JAVA_HOME/bin"
export ANDROID_HOME="/home/nssdt022/Android/Sdk/"
export PATH="${PATH}:${ANDROID_HOME}build-tools/:${ANDROID_HOME}platform-tools/"

Comments

Popular posts from this blog

How to Add Firebase Analytics to Your NativeScript Mobile App

sidemenu refresh through events

push multiple data in array(select and disselect items in array)