Create Hybrid Android app with Ionic

Prerequisites

Please install the following in order to start with cordova development:
  • Node JS
  • Android SDK

Nodejs

Download nodejs from the official website as per your operating system. Link: https://nodejs.org/en/download/

Android SDK

Install Android SDK with:
  • SDK Tools
  • SDK Platfrom tools
  • SDK Build tools
  • SDK Platfrom (API 22)
Link: http://developer.android.com/sdk/index.html#downloads Also, use HAXM from Intel to speed up the Android Emulator on Intel based hardware. Link: https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager

Installation

Install ionic pacakge globally:
npm install -g cordova ionic
Create a blank app which you can use to test if all packages are installed and working correctly.
ionic start BlankSlate blank
Based on the platform you are developing for, run the following command(s):
ionic platform add android

ionic platform add ios

Create ‘apk’ bundle

Now to create an ‘apk’ bundle, run the following command:
ionic build android
APK would be created in:
BlankSlate\platforms\android\build\outputs\apk

Installing apk bundle into AVD

To install APK into any Virtual Device, just start the AVD, and drag and drop APK into the Emulator.

Debugging on chrome

To debug apps on chrome:
chrome://inspect/#devices
cordova debugging in chrome cordova debugging in chrome 1