NOTE! You are browsing legacy documentation. For latest visit docs.nativescript.org.

NativeScript Angular

NativeScript Advanced Setup: Windows

This page contains a guided walkthrough for installing NativeScript requirements and start building and running NativeScript apps on Windows.

NOTE: On Windows systems you can only use the NativeScript CLI to develop Android apps. This is because the NativeScript CLI uses Xcode to build iOS apps, which is only available on the macOS operating system. If you’re interested in building iOS apps on Windows, you may want to try out NativeScript Remote Builds.

Prerequisites

  • Windows 7 Service Pack 1 or later

Setup Steps

Complete the following steps to set up NativeScript on your Windows development machine:

  1. Install Chocolatey to simplify the installation and configuration of the requirements.

    • Run the command prompt as an Administrator.
    • Copy and paste the following script in the command prompt.

      @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
      
    • Restart the command prompt.
  2. Install Google Chrome (required to debug NativeScript apps)

    • In the command prompt, run the following command.

      choco install googlechrome -y
      
  3. Install the latest Node.js LTS

    • In the command prompt, run the following command.

      choco install nodejs-lts -y
      
  4. Set up JDK 8

    • In the command prompt, run the following command.

      choco install adoptopenjdk --version 8.192
      
  5. Install the Android SDK.

    • In the command prompt, run the following command.

      choco install android-sdk -y
      
    • Restart the command prompt.

  6. Install all packages for the Android SDK Platform 28, Android SDK Build-Tools 28.0.3 or later, Android Support Repository, Google Repository and any other SDKs that you may need. You can alternatively use the following command, which will install all required packages.

    "%ANDROID_HOME%\tools\bin\sdkmanager" "emulator" "platform-tools" "platforms;android-28" "build-tools;28.0.3" "extras;android;m2repository" "extras;google;m2repository"
    
  7. Setup Android Emulators (AVD) by following the article here

  8. Install the NativeScript CLI.

    • Run the following command.

      npm i -g nativescript
      
    • Restart the command prompt.

  9. To check if your system is configured properly, run the following command.

    tns doctor
    

If you see "No issues were detected" you are good to go!

NativeScript tns doctor result

What’s Next