Installation of Ionic Framework

Installation of Ionic Framework

Installation of Ionic Framework


Required versions for setting up ionic framework.
ionic 1.7.16
node v4.2.6
npm 3.5.2
cordova 7.1.0
java(oracle) 1.8.0
gradle 4.3.1

Enter the following commands from terminal:

Nodejs Installation:

sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install build-essential
sudo apt-get install build-essential libssl-dev
sudo apt-get update
sudo apt-get install nodejs



nvm ls-remote
nvm install 4.2.6
nvm use 4.2.6

Above 3 commands not working then Use below commands.
changing the version of NPM

source ~/.nvm/nvm.sh

**check installation from terminal as follows:
node -v

npm Installation:
sudo npm install npm@3.5.2 -g (OR) export npm_install="3.5.2" 
curl -L https://www.npmjs.com/install.sh | sh


**check installation from terminal as follows:
npm -v

ionic Installation:
sudo npm install -g ionic@1.7.16

**check installation from terminal as follows:
ionic -v

cordova Installation:
sudo npm install -g cordova@7.1.0

**check installation from terminal as follows:
cordova -v


java Installation:
sudo apt-get update
sudo apt-get install oracle-java8-installer

**Check the above installations from terminal as follows:
java -version

Gradle Installation:
sudo add-apt-repository ppa:cwchien/gradle
sudo apt-get update
sudo apt-get install gradle

**Check the above installations from terminal as follows:
gradle -v

Now let's start making an app,enter the follwing commands from terminal:

ionic start app_name tabs

goto app folder:
cd app_name

add android platform to app:

ionic platform add android
Error:no android installed
so,please install android studio 2.2.3

Then run,ionic platform add android

ionic build android
Errors:No path setting for JAVA_HOME && ANDROID_HOME

Install android-sdk tools and place it in opt folder

Now open bashrc file from terminal as follows:
sudo nano ~/.bashrc

PASTE THE FOLLOWING:

export ANDROID_HOME=/opt/android-sdk
export JAVA_HOME=/usr/lib/jvm/java-8-oracle

SAVE IT and CLOSE THE FILE

ionic build android
Error:spawn ACCESS

run from terminal
sudo chmod 777 -R *

ionic build android

Now an apk gets generated,place that in var/www/html path.Connect your phone and system to same network.Enter the system ip address in phone browser,you will see all the files which are in var/www/html path.
Click on the apk file,download and Install it.

You can view the app in system by entering the following command:
ionic serve

0 Response to "Installation of Ionic Framework"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel