Official Post: https://ionictheme.com/setting-up-ionic4-on-windows10/
Hi everybody, we are starting our first post on 2019 bringing some tips about Ionic 4 + Windows 10.
A very interesting fact is that most Ionic developers (or at least our customers) are Windows users (more than 70%), which means that many issues can happen both to configure and also to run and build.
So let's take a look at some tips on configuring and developing Ionic 4 with Windows 10.
At first time, do you need to choose wich path you will to follow to config;
NOTE: We recommend to use PowerShell instead Prompt Command for command line and pay attention about Node version, you should to install Node 10+ for Ionic 4 + Angular 7.
Install directly by download link from their website. or by Chocolatey package manager.
Once installed, you should have access to both node
and npm from your command line.
We’ll need to download and install the Java JDK from their website.
Download Android Studio and go through the installer and set up the IDE. It should print out a location for where the Android SDK gets installed. Copy this down for future use.
If you don’t want to download Android Studio you can just download the Android SDK files for Windows here.
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.
Or run tools/android by terminal to open the Android SDK Manager. We’ll want to install:
Accept the license and let the packages install.
If you install the Android SDK without Android Studio you have to install Gradle seperatly. Download Gradle from the offical Gradle website.
Now that everything’s installed, we’ll need to set some environment variables for our command line. From the startmenu, search for “System Environment Variables”. From here, we’ll update the user variable PATH and create a new variable of ANDROID_HOME
ANDROID_HOME: The path to where the Android SDK is installed.PATH: Two entries, one where Tools are installed for the Android SDK, and another for Platform toolsGRADLE_HOME: The path to where gradle is installedOr set them with the Windows Command Line
set ANDROID_HOME=C:\<installation location>\sdk
set PATH=%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools
set GRADLE_HOME=C:\<installation location>
From here, we should be able to run
# check Java version
java -version
# start the Android SDK manager
android
Now, you should be able to create and build an Android project from the command line.
Extremely needed! it allows development teams to contribute code to the same project without causing code conflicts, also needed to Ionic Appflow git repositories.
https://git-scm.com/download/win
NOTE: For global package installs
-g, it's recommended to open the PowerShell as Admin
To install Sass open your PowerShell and execute the following command:
C:\npm install -g sass
For more information visit Sass site.
Ionic and Angular needs a Typescript, ionic is built with TypeScript, using it to build an Ionic app is completely optional.
C:\npm install -g typescript
Install the Ionic CLI globally with npm:
C:\npm install -g ionic
From now on! you are ready to start your Ionic App, if everything were well at this moment, good job!
Follow below some official links by Ionic Docs to you know more about and begin your projects.
Credits and inspiration