SciChart Android v2 SDK User Manual > Setup an Android Development Environment on Windows
Setup an Android Development Environment on Windows
The following guide will help you setup a Development Environment for Android on Windows. You can skip this if you already have Android Studio and the Android NDK setup!

Installing the Java Development Kit

Java Development Kit is required to start development with Android Studio. First of all, you should go to https://www.java.com/en/download/ and download Java 8 for Windows (if you don’t have it already). Then, Java Platform JDK can be obtained for installation from http://www.oracle.com/technetwork/java/javase/downloads/index.html.

NOTE: Make a note of your JDK Install path. For instance, C:\Program Files\Java\jdk1.8.0_91. This will be required later when setting environment variables.

Installing Android Studio

Download Android Studio for Windows from the official site. Follow the steps to install the application. We recommend that you choose Android SDK and Android Virtual Device to be installed together with Android Studio, as these are required components. However, they can be installed later via Android SDK Manager.

Once Android Studio got installed, you can run it:

Installing the Android SDK

Now you need to download some packages required for further work in Android Studio. This can be done via Android SDK Manager. Choose it from the “Configure” dropdown list to launch:

Alternatively, within Android Studio, the SDK Manager can be accessed via the Tools>Android -> SDK Manager option or a corresponding button from the menu at the top:

In the SDK Manager, on the SDK Platforms tab, choose platforms you want to develop for. For instance, we require v4.4 to vLatest for SciChart Android development:

You can select or deselect particular components of a package checking the “Show Package Details” at the bottom right corner:

Next, under SDK Tools ensure ‘Android SDK Build Tools’ is up to date. If you are going to run the SciChart Example Suite or use source code of SciChart Android libraries, you need to download the Intel x86 Emulator Accelerator and Android NDK v14:

Ensure you selected the right build tools checking the “Show Package Details” at the bottom right corner:

Installing the Android NDK

Certain components in SciChart Android are dependent on the Android NDK (Native Development Kit). Installing this is required if you are building our examples or SciChart Android library from source-code.

The Android NDK can be downloaded via the SDK Manager within Android Studio. Go to Tools>Android>SDK Manager or press a corresponding button from the menu at the top:

 Under SDK Tools ensure the Android NDK is checked and up to date:

Setting Environment Variables

NOTE:This step is required if you are building our examples or SciChart Android library from source-code.

The following environment variables must be set to allow development of SciChart Android in Android Studio on Windows:

• JAVA_HOME: The location of the Java JDK

• ANDROID_HOME: The location of the Android SDK on disk

• ANDROID_NDK_HOME: The location of the Android NDK on disk

To set environment variables so that they may be read by applications, you need to go to ControlPanel->System and Security->System->Advanced system settings :

On the “System Proprties” window press the “Environment Variables…” button:

The “Environment Variables” window will appear. Press the “New…” button and enter the name and path for a new variable:

See Also