Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Ionic framework on Ubuntu?

I am using Ubuntu 14.04 version. I would like to use Ionic to build app for Android. I couldn't find exact solution to install Ionic.

like image 808
Mansukh Ahir Avatar asked Jun 25 '15 04:06

Mansukh Ahir


1 Answers

See the Cordova Platform Guide here and the Ionic Installation Guide here, but I'm highlighting the key steps for Ubuntu.

  1. Install JDK 8. (This part was taken from this question).

    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java8-installer
    sudo apt-get install oracle-java8-set-default
    
  2. Install node.js 0.12. NodeSource install guide for Ubuntu and co.

  3. Install Android Studio and the Android SDK from Google. (I will refer to the folder where you install as where-you-unpacked-the-sdk later.)

  4. Using a terminal, install the Ionic CLI and related tools.

    sudo apt-get install git ruby
    sudo gem install compass
    sudo npm install -g cordova ionic grunt-cli bower gulp
    
  5. Add the Android SDK to your PATH and set the ANDROID_HOME environment variable correctly. Using ~/.bash_profile for this is the usual approach.

    echo "export ANDROID_HOME=/where-you-unpacked-the-sdk/sdk" >> ~/.bash_profile
    echo "export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools" >> ~/.bash_profile
    source ~/.bash_profile
    
  6. Start using Ionic!

    ionic start todo example
    cd example
    ionic platform add android
    ionic run android
    
like image 147
vzsg Avatar answered Sep 28 '22 06:09

vzsg