How to prepare your Windows box for Ionic 3 development

Stavros Kounis
Appseed IO
Published in
4 min readMay 4, 2018

The guide assumes the OS of your machine is Windows 10.

Install NodeJS

Download and install the latest LTS NodeJS from the following link:

Note: At the time this guide was written, the latest LTS version of NodeJS was 8.10.0.

Install CLIs

To install the global dependencies open the Command Prompt (cmd) and run:

$ npm install -g ionic cordova

Note: This command will install the latest version of Ionic and Cordova. At the time this guide was written, the latest version of Ionic was 3.20.0 and Cordova was 7.1.0.

SDK environment for Android platform

To be ready to add and build the Android platform, follow the steps below.

Install Java SE Development Kit 8 (JDK)

Visit Oracle’s website and install Java SE Development Kit 8.

Install Android Studio 3.x.

Visit Android’s Studio page and install Android Studio 3.x.

Install SDK Platforms

After installing the Android SDK, you must also install the packages for whatever API level you wish to target. To do it, open the Android Studio, and click on Configure -> SDK Manager.

Then, from the side menu, select Appearance & Behavior -> System Settings -> Android SDK click on the SDK Platforms tab and select one or more versions of APIs to download, as shown:

Install Android Support Repository

Usually, Android Support Repository is already configured once you install Android Studio. If it’s not, go to the SDK Tools tab select to install the Android Support Repository.

Install Gradle

Sometimes, you may need to install Gradle manually. Install Gradle as directed at:

Note: Following the instructions of the aforementioned link, the latest Gradle distribution will be installed on your machine. At the time this guide was written, the installed Gradle version was 4.5.1.

For more information on the Android requirements, visit

Set environment variables

Cordova’s CLI tools require some environment variables to be set in order to function correctly. In most cases, they will be set automatically but, in certain cases you may need to set them manually.

Type advanced system settings in the Search the web and Windows box and select View advanced system settings under the Best Match

From the appeared window select Advanced tab and click Environment variables

Set JAVA_HOME

Next, set the JAVA_HOME environment variable to the location of your JDK installation. From the appeared window click New… and set the Variable Name to JAVA_HOME and the Variable value to the location of the installed Java JDK.

Update PATH

From System Variables select Path and press Edit…

In the next window, press New and set the location to the PATH as %JAVA_HOME%\bin

Set ANDROID_HOME

Finally, set the ANDROID_HOME environment variable to the location of your Android SDK installation. To do this, click New… and set the Variable Name to ANDROID_HOME and the Variable value to the location of the installed Java JDK.

Sass

To install Sass open your terminal and execute the following command:

$ npm install -g sass

For more information visit Sass site.

References

Install Android Studio guide, Android Platform Guide, Gradle installation docs.

Originally published at AppSeed’s blog.

--

--

Stavros Kounis
Appseed IO

Software developer and Javascript enthusiast, passioned with web and mobile technologies, skounis.github.io