Written by

Hari Murugesan

Share

  

Category

see all categories
intranet as a service

How to Build Ionic App in Android(step by step)?

In this article we are going to discuss how to setup Ionic environment in your machine and run android app in that. Ionic is one of the powerful tool which supports multiple platforms like Android, IOS, Windows, etc…

Tools to be installed to setup Ionic:

To work with Ionic we need following set of tools to be installed in your machine.                 

1. Android SDK (https://developer.android.com/studio/)
2. js (https://nodejs.org )

Let look into each with step by step implementations,   

 Android SDK Setup:

  1. Download android studio in following link
  1. Once android studio is downloaded please install it with admin permission.
  1. If you want to know more about android studio installation steps please follow below blog

https://www.javaworld.com/article/3095406/android/android-studio-for-beginners-part-1-installation-and-setup.html

Node.js Setup

Please download the latest version of  node.js and install, once installed you will get the node.js command prompt which will look like below,

java

We have the required tools ready, now we need to set up the Java environment path.

Environment Path Setup:

Please follow the below steps to setup up the JAVA environment path

 

1. Go to the following location,

C: -> Program Files -> Java folder -> JDK ->  Bin and copy the folder path from windows explorer.

Example: - C:\Program Files\Java\jdk1.8.0_152\bin

2. Now, go to control panel -> System and Security -> System ->Advanced System Securities (it will be displayed in left side). You will be prompted with a popup window and Environment Variables button will be there in the bottom of the popup under the Advanced

3. Now you will get another popup with list of system environment variables and click NEW button to setup environment path for JAVA which will look like below,

Java-14. Now you can give a variable name as JAVA then the variable value is your JDK path (which you have copied in the step 1) and click OK.

Now we have successfully setup the android setup in our machine, let’s see how to install ionic package.

Leaderboard_CDR

Setup Ionic package

1. Open your node.js comment prompt and install IONIC Plugins by using the below command

                               npm install -g cordova ionic

Once required node packages are downloaded for ionic we are set to go to create ionic app.

2. Create a project directory and go to that project directory in node.js command prompt

Example: E:/Learning/First-Ionic-App

3. Create an ionic project using the below command

ionic start myApp blank

4. Now you need to add android platform in the ionic project with the below command

                                cordova platform add android.

5. Once the platform is added then you can run the project with below command

ionic Cordova run android.

which will show you android emulator with empty page.

In this article, we have discussed how to setup android environment with Ionic framework and create a new ionic project with android platform. I will explain how to setup IOS in ionic environment in my next article.

If you have any questions/issues about this article, please let me know in comments.

Hari Murugesan

Written by Hari Murugesan

Everybody gets crazy with iPhone release dates, but not Hari. He is so obsessed with Android and obviously, the perfect person to handle our Android apps development. When he plugs his earphone on and clicks opens Android Studio, we can trust he started shaping the App he is on. A gym bunny who spends the rest of the time shaping him as well.