×

Environment setup

1. Download and install ADT Bundle

Download the latest Android Developer Tools (ADT) Bundle including the Android SDK from http://developer.android.com/sdk/index.html. Install the software by following the instructions at http://developer.android.com/sdk/installing/bundle.html. Note that the website automatically detects your OS and provides the appropriate installation package.

Note that Eclipse IDE, which is included in the ADT Bundle, requires JDK to work (JRE alone is not sufficient). Make sure that the bit version of the bundle matches the JDK, i.e., both need to be either 32-bit or 64-bit. Having different versions will result in an error. The general recommendation is to install the latest JDK version, but depending on the host platform some compatibility problems may arise. The supported JDK versions of each Eclipse IDE are listed in the Eclipse project release notes, which can be found at www.eclipse.org.

2. Install required packages with Android SDK Manager

Launch the Android SDK Manager. The manager application can be launched from the IDE or the command line. Launching the manager from the command line:

Windows

<Android SDK installation path>\SDK Manager.exe

Linux and Mac

<Android SDK installation path>/tools/android sdk

Tip: If you prefer using the command line tools, add the paths to the executable tools into environment variables so that you don't have to explicitly define the path when using a tool. A guide demonstrating how to do this for each host platform can be found here.

To launch the Android SDK Manager in IDE: first, launch Eclipse. Then, in Windows and Linux, select Window -> Android SDK Manager (figure 1). In Mac, locate the Android SDK Manager icon from menu on the top of the IDE window (tooltips are provided) and click the icon to open (figure 2).

Figure 1. Android SDK Manager and Android Virtual Device Manager can be launched under Window menu in Windows and Linux.

Figure 1. Android SDK Manager and Android Virtual Device Manager can be launched under Window menu in Windows and Linux.

Figure 2. Location of launcher icons in Eclipse in Mac.

Figure 2. Location of launcher icons in Eclipse in Mac.

Install the following packages:

  • Tools
    • Android SDK Tools*
    • Android SDK Platform-tools*
  • Extras
    • Intel x86 Emulator Accelerator (emulator prerequisite for x86 system images)

*) Installed by default, but update to the latest version is recommended. You may run into problems with the environment with outdated packages.

In addition, for Nokia X2 install the packages for Android 4.3 API 18:

  • Android API version 4.3 API 18
    • SDK Platform
    • ARM EABI v7a System Image (emulator prerequisite for ARM system images)
    • Intel x86 Atom System Image (emulator prerequisite for x86 system images)

For Nokia X/X+/XL install the packages for Android 4.1.2 API 16:

  • Android API version 4.1.2 API 16
    • SDK Platform
    • ARM EABI v7a System Image (emulator prerequisite for ARM system images)
    • Intel x86 Atom System Image (emulator prerequisite for x86 system images)

The packages above are required by the Nokia X software platform development environment. Note that there is no need to uninstall any packages that are installed by default.

Important:

  • For faster emulator experience, it is recommended to install the Intel HAXM executable following the instructions given here. Note, that Intel HAXM works only with Intel Atom (x86) AVD (see the Setting up the emulator section for more details).
  • To use x86 emulator on Microsoft Windows 8.1 or Mac OS 10.6 and later, ensure that the respective OS specific Hotfix is installed from the Intel® Hardware Accelerated Execution Manager download page.
Figure 3. Required AOSP packages installed with Android SDK Manager.

Figure 3. Required AOSP packages installed with Android SDK Manager.

Video: Installing standard Android SDK

The media player is loading...

3. Install Nokia X specific packages

You can install the Nokia X specific packages with the SDK Manager by providing a new add-on site URL. Alternatively, you can use an installer to install the packages. The instructions for using the installer are provided in the download package.

The steps for installing the Nokia X packages with the SDK Manager are the following:

  1. Open the SDK Manager and select Tools -> Manage Add-on Sites...
  2. Open User Defined Sites tab and click the New... button
  3. Enter the following URL to the Add Add-on Site URL dialog:

    http://tools.nokia.com/nokia-x/repository/addon.xml
  4. Click OK
  5. Click the Close button to close the Add-on Sites window

You should now see the following packages available for install in the SDK Manager. The system image is different depending on whether you are developing for Nokia X2 or Nokia X/X+/XL. For the aforementioned you should have:

  • Android 4.3 (API 18)
    • Nokia X software platform 2.0

And for Nokia X/X+/XL:

  • Android 4.1.2 (API 16)
    • Nokia X software platform 1.1

The extras packages are the same for both:

  • Extras
    • Nokia X Device Definitions
    • Nokia X services
    • Nokia X USB Driver
Figure 4. Nokia X packages installed. Note that the order of the items in the image may differ.

Figure 4. Nokia X packages installed. Note that the order of the items in the image may differ.

In case the Nokia X add-on fails to load (SDK Manager displays error message: "Addon failed to load: Unable to find base platform with API level '16'"), you probably missed the instructions to install the correct Android API packages as described in step 2. If this was the case, install the missing packages and restart the SDK Manager.

Video: Installing Nokia X packages

The media player is loading...

4. Setting up the emulator

To set up the emulator, we need to create a new Android Virtual Device (AVD). Like installing packages, this can also be done either from the Eclipse IDE, or by command. From Eclipse: in Windows and Linux, select Window -> Android Virtual Device Manager (figure 1). In Mac, locate the Android Virtual Device Manager icon from the menu and click the icon to launch the manager (figure 2). If the menu is not visible, go to Window -> Show Toolbar. Launching the AVD manager from the command line can be done with command:

Windows

<Android SDK installation path>\tools\android avd

Linux and Mac

<Android SDK installation path>/tools/android avd

Open the Device Definition tab, select Nokia X by Nokia or Nokia X2 by Nokia from the list of devices and click Create AVD button (see figure 5).

Figure 5. Android Virtual Device Manager, Device Definitions tab.

Figure 5. Android Virtual Device Manager, Device Definitions tab.

Provide a name for the AVD, for example "AVD_for_Nokia_X" or "AVD_for_Nokia_X2". Also, ensure that the target of the AVD is:

  • Nokia X software platform 2.0 (Nokia) - API Level 18 for Nokia X2
  • Nokia X software platform 1.1 (Nokia) - API Level 16 for Nokia X/X+/XL

It is recommended to set a SD card and check Use Host GPU since those are required to run HERE applications, change the IMEI and MCC/MNC number of the emulator, and to run Xpress Browser (figures 6 and 7). Select the desired AVD from the CPU/ABI drop-down and select the Skin option as Skin with dynamic hardware controls. Once you are happy with the settings click OK to create the virtual device. Note that you can change the settings of the AVD later.

Figure 6. Creating Nokia X2 Android Virtual Device.

Figure 6. Creating Nokia X2 Android Virtual Device.

Figure 7. Creating Nokia X Android Virtual Device.

Figure 7. Creating Nokia X Android Virtual Device.

To verify that the emulator works, you can launch it by going back to Android Virtual Devices tab in Android Virtual Device Manager, selecting the created AVD and clicking the Start button (figures 7 and 8). You can also launch the AVD from the command line:

Windows

<Android SDK installation path>\tools\emulator -avd AVD_for_Nokia_X2

Linux and Mac

<Android SDK installation path>/tools/emulator -avd AVD_for_Nokia_X2

(Syntax: emulator -avd <the name of the AVD to launch>)

Figure 8. Android Virtual Device ready to be started.

Figure 8. Android Virtual Device ready to be started.

Note: While launching the Intel Atom x86 AVD, if you get the following error message, it means that the Intel HAXM executable is not installed. Refer to step 2 to install the executable. However, this does not affect the working of the AVD in any manner.

Figure 9. Error message.

Figure 9. Error message.

Video: Setting up the emulators

The media player is loading...

Using the Snapshot feature

Using the snapshot feature allows the emulator state to be persistent between emulator executions. This will also make the emulator start up faster. Unfortunately, GPU emulation cannot be used together with this feature and thus, you cannot work with HERE Maps, if this feature is enabled. However, if you don't need GPU emulation, you can use the feature with no problems.

To enable and test the Snapshot feature, do the following:

  • Select the Snapshot setting in the Emulating Options when creating or editing the AVD (figure 6) and launch the emulator.
  • On the first launch, deselect Launch from snapshot and select Save to snapshot.
  • Wait for the emulator to start and when the emulator is in a state you want (e.g., Device is in Airplane mode), shut down the emulator. Shutting down will take some time, because a snapshot is created.
  • Start the emulator again, but this time select Launch from snapshot and deselect Save to snapshot. The emulator is launched a lot faster now and it will be in the state where the snapshot was created (e.g., Airplane mode).

Last updated 25 June 2014

Back to top

×