ionic-cordova-installation
ionic-cordova-installation
ionic-cordova-installation

Have you tired of searching ionic and cordova (PhoneGap) setup tutorial ? We have written step by step instruction for you. This article is common for both windows & Mac. Please do not skip any single steps.

We have also added checklist on every steps & included

Disclaimer: You must need a mac, if you want to build your app for iOS

Tools Required

  1. Node JS
  2. JAVA JDK & JRE
  3. Android Studio
  4. XCode (available only for mac)

Step 1: Download & Install nodeJS

Node JS is used as environment for running ionic & cordova. you can download Node JS (stable) using https://nodejs.org/en/download/

Checklist:

1.1: I have downloaded & Installed Node JS

1.2: I have opened Command prompt & Executed node -v & npm -v without any error

 

Step 2: Installing Cordova

For installing cordova on your machine, you need to open your command prompt / terminal & execute

npm install -g cordova

Checklist

2.1: I have Installed Cordova & I can run cordova -v without any error

Step 3: Installing Ionic

If you want to install ionic, you can open your command prompt execute

npm install -g ionic

Checklist

3.1: I have Installed Cordova & I can run ionic --version without any error

Step 4: Download & Install Java JDK & JRE

JDK & JRE are supporting softwares / libraries for Android Build. Download JAVA JDK from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html. Download JRE using http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

Checklist:

4.1: I have downloaded & Installed both JDK & JRE
4.2: I have re-opened Command prompt & Executed java -version without any error
4.3: I have re-opened Command prompt & Executed javac -version without any error

If you faced any issue like, command not found, you must need to do path setup for your java. Please refer below

Reference:

Please don’t move next step without completing above checklist

 

Step 5: Installing Android Studio

Android Studio is used for building & generating apk files for your project. Download Android Studio from https://developer.android.com/studio/index.html

Reference

Checklist:

5.1: I have downloaded Android Studio & Installed Successfully
5.2: I have Opened Android Studio & Created First Project Successfully
5.3: I have created an emulator & run my first project successfully

Path setup for Android

You need to setup path for you android for building your app from terminal. Path might vary based on your system. Please refer the reference link

For Windows

C:\Android\androidsdk\sdk\tools;
C:\Android\androidsdk\sdk\build-tools/27.0.3
C:\Android\androidsdk\sdk\platform-tools

For Mac

/Users/sundaravel/android/sdk/tools
/Users/sundaravel/android/sdk/platform-tools
/Users/sundaravel/android/sdk/build-tools/27.0.3

Reference:

 

Cheers!! Hope this helps.

If you faced any issue, feel free to comment below.

Useful Links