NativeScript Advanced Setup: Windows

This page contains a list of all system requirements needed to build and run NativeScript apps on Windows, as well as a guided walkthrough for getting these requirements in place.

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 the Telerik Platform. The Telerik Platform provides robust tooling for NativeScript apps, including a service that performs iOS and Android builds in the cloud, removing the need to complete these system requirements, and allowing you to build for iOS on Windows.

System Requirements

  • Windows 7 Service Pack 1 or later
  • The latest stable official release of Node.js (LTS) 6.x
  • (Optional) Chocolatey to simplify the installation of dependencies
  • JDK 8 or a later stable official release
  • Android SDK 22 or a later stable official release
  • Local Maven repository for Support Libraries
  • Android SDK Build-tools 25.0.2 or a later stable official release
  • Set up Android virtual devices to expand your testing options

You must also have the following two environment variables setup for Android development, which will automatically be added for you as part of the installation:

  • JAVA_HOME
  • ANDROID_HOME

Advanced 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 Android tools and SDKs.

    • 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 the latest Node.js 6.x or 7.x stable official release. We recommend using Node.js v4.x.

    • In the command prompt, run the following command.

      choco install nodejs -y -version 6.9.1
      
  3. Install JDK 8 or a later stable official release.

    • In the command prompt, run the following command.

      choco install jdk8 -y
      
  4. Install the Android SDK.

    • In the command prompt, run the following command.

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

  5. Install the required Android SDKs and the Local Maven repository for Support Libraries.

    echo yes | "%ANDROID_HOME%\tools\android" update sdk --filter tools,platform-tools,android-23,build-tools-23.0.3,extra-android-m2repository,extra-google-m2repository,extra-android-support --all --no-ui
    
  6. Install Android virtual devices (AVDs)

    Alternativly a Visual Studio emulator for Android can be used, More information here

  7. Install the NativeScript CLI.

    • Run the following command.

      npm i -g nativescript
      
    • Restart the command prompt.

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

    tns doctor
    

What’s Next

Stay connected with NativeScript

(expect a newsletter every 4-8 weeks)

NativeScript
NativeScript is licensed under the Apache 2.0 license .
© 2016 Progress Software Corporation. All Rights Reserved.