Thursday, 7 January 2016

Post 36: ionic android cordova

First install nodejs:
Install Java:
How to Install Java
Install cordova
sudo apt-add-repository ppa:cordova-ubuntu/ppa sudo apt-get update sudo apt-get install cordova-cli npm install -g cordova
Install ionic
sudo npm install -g cordova
download android sdk (go down to "SDK only"):

update android manager
open the directory "android-sdk-linux" and go to the "tools" folder. Open android manager:
set variable ANDROID_HOME to where the android sdk is located:
export ANDROID_HOME=/path/to/the/diretory/android-sdk-linux"

Start a new ionic project:
ionic start app_name blank
Selecting "blank" gives you a blank project. Optionally you can also choose "tabs", or "sidemenu".

cd app_name

Add platform:
ionic platform add android
Build ionic project:
ionic build android

test it on browser:
ionic serve --lab

test it on device:
ionic run android