
Ionic is a framework which is an open source tool for developing hybrid mobile applications. Ionic framework is build on top of cordova. Hybrid mobile applications are nothing but mobile applications which are build using HTML, CSS, and JavaScript. Follow the simple steps to create a Android App and run it in your android device.
First, install Node.js - from the link https://nodejs.org/en/
Open command prompt:
In RUN (Window+R in windows), enter the command cmd to open command prompt. Navigate to the folder location you want to build your application.
Enter the following commands in Command Prompt:
Installing Ionic via commandline...
npm install -g cordova ionic
Starting an ionic project:
Start a ionic project using the predefined app templates...
ionic start -a MyfirstApp -i com.MyfirstApp.App MyfirstAndroidApp tabs
If you need to start with a blank templete then,
ionic start -a MyfirstApp -i com.MyfirstApp.App MyfirstAndroidApp blank
In order to add platform to the created ionic project it navigate to the app folder using,
cd MyfirstAndroidApp
Add the platform into the ionic app using,
ionic platform add android
Build the project using,
ionic build android --device
Run the App in Andrid device:
In order to emulate or run the app in device follow the steps,
- Connect your mobile via data cable and enable USB Debugging in the settings.
- Enable Developer options in mobile settings. If you didn’t find an option the you have to enable it by taping 7 time on your build number.
- Install the mobile drivers in the system and Android Debug Bridge (ADB). Follow the steps at https://software.intel.com/en-us/xdk/docs/installing-android-debug-bridge-adb-usb-driver-on-windows
-
adb devices
-
ionic run android --device
This run the app in the connected device
Output: