This documentation relates to previous versions of Titanium.

To see the latest documentation, visit docs.appcelerator.com.

Skip to end of metadata
Go to start of metadata

Overview

This guide describes where to obtain and how to install the Google Android SDK and associated packages.

Table of Contents

Compatibility and Download

Titanium requires the Android SDK to be installed in order to allow you to develop Android applications. Unless you intend to write applications exclusively for Apple products, you should install this component.

Remember that Oracle JDK is a prerequisite for Android development, and so should be installed first. See Installing Oracle JDK for instructions.

The Android SDK Manager installer may be obtained from the Official Website

Installation

OSX

Software Locations

Below is a summary of where Titanium-related components are typically stored and the system variables that should be configured.

The paths shown are the locations on our running systems. As these configurations are tried and tested with Titanium, try to keep yours as similar as possible to this.

Package

Environment Variable

Local Path

Notes

Android SDK Home

N/A

/Applications/android-sdk-macosx

Location of android (Android SDK Manager) and ddms (debug tool) executables

Android Tools

PATH

/Applications/android-sdk-macosx/tools

Location of android (Android SDK Manager) and ddms (debug tool) executables

Android Platform Tools

PATH

/Applications/android-sdk-macosx/platform-tools

Location of adb (Android Debug Bridge) executable

git

N/A

/usr/bin

Location of git executable

Oracle JDK

N/A

/usr/bin

Location of Java executables, java and javac (automatically symlinked)

python

N/A

/usr/bin

Location of python executable

Titanium SDK Home

N/A

/Library/Application Support/Titanium
or
~/Library/Application Support/Titanium

Location of Mobile and Desktop SDKs (containing mobilesdk, modules, runtime & sdk directories), automatically managed by Titanium Studio

Titanium Studio

N/A

/Applications/Titanium Studio

Location of Titanium Studio

Titanium Studio Settings

N/A

~/.eclipse

 

Installing Android SDK Manager

  • after download, extract the Android SDK Tools zip archive and drag & drop the android-sdk-maxosx folder into the your system's Applications folder (just use the Applications icon in the Dock)

Windows

Software Locations

Below is a summary of where Titanium-related components are typically stored and, where applicable, their respective system variables that will need to be configured.

The paths shown are the locations on our running systems. As these configurations are tried and tested with Titanium, try to keep yours as similar as possible to this.

Package

Environment Variable

Local Path

Notes

Android SDK Home

N/A

C:\Program Files (x86)\Android\android-sdk

Location of android (Android SDK Manager) and ddms (debug tool) executables

Android Tools

PATH

C:\Program Files (x86)\Android\android-sdk\tools

Location of android (Android SDK Manager) and ddms (debug tool) executables

Android Platform Tools

PATH

C:\Program Files (x86)\Android\android-sdk\platform-tools

Location of adb (Android Debug Bridge) executable

git

N/A

C:\Program Files (x86)\Git\bin

Location of git executable

Oracle JDK

PATH

C:\Program Files (x86)\Java\jdk1.6.0_xx\bin

Location of Java executables, java and javac. Note xx is rev number

python

N/A

C:\Program Files (x86)\Python27

Location of python executable

Titanium SDK Home

N/A

%PROGRAMDATA%\Titanium

Location of Mobile and Desktop SDKs (containing mobilesdk, modules, runtime & sdk directories), automatically managed by Titanium Studio

Titanium Studio

N/A

%USERPROFILE%\AppData\Local\Titanium Studio

Location of Titanium Studio

Titanium Studio Settings

N/A

%USERPROFILE%\.eclipse

 

The following table shows environment variables and their values that exist by default on Windows 7 systems:

Environment Variable

Value

Notes

%PROGRAMFILES%

C:\Program Files (x86)

Windows 64bit systems

%PROGRAMFILES%

C:\Program Files

Windows 32bit systems

%PROGRAMDATA%

C:\ProgramData

 

%USERPROFILE%

 

Path to the current user profile

Installing Titanium Studio to a common system location, such as %PROGRAMFILES%, is not currently recommended, due to Eclipse Bug 249133 and the complications it causes with updates.

Installing Android SDK Manager

Once you have downloaded the Android SDK Manager Installer, double-click to run it.

  • proceed to the Java SE Development Kit stage and verify that Java SE Development Kit (JDK) version 1.6 has been found

  • at the Choose Install Location step, verify that the Destination Folder is the same as your Android SDK HOME folder, and correct if not. This path will be required when configuring Titanium Studio
  • ensure that there is sufficient space for the installation

  • complete the installation

Refer to the #Windows Software Locations section, and add the path of the Android SDK Tools directory to your system's PATH.

Installing Android Packages with Android SDK Manager

When the Android SDK Tools software has been installed, you can install the platform SDK packages using its Android SDK Manager.

  • log in under your usual user account, right-click the SDK Manager from the Windows Start Menu and select Run as administrator. Enter the Administrator password, if you are prompted for it
  • in the Android SDK Manager, you will see different versions of the following items listed:
    • Android SDK Tools (mandatory) - includes the Android SDK Manager and Android Virtual Device Manager (android executable)
    • Android SDK Platform Tools (mandatory) - includes Android Debug Bridge, (adb executable)
    • SDK Platform - provides the virtual device running a specific version of Android that uses the standard Google APIs
    • Google APIs by Google Inc - provides the virtual device running a specific version of Android that uses the enhanced Google APIs (includes maps support). Most developers use this rather than the standard SDKs.
  • set the filter options at the bottom and select the packages shown in the screenshot for installation. These packages represent the minimum necessary in order to use Titanium
  • click the Install x packages button

  • select Accept All and proceed

  • click Yes to restart adb and complete the installation

The screenshot below shows the packages that Titanium supports at the time of writing (Oct 2011), but refer to the Titanium Compatibility Matrix for more up-to-date and accurate information

It's easy to neglect to install the third-party APIs and tools, such as Google's enhanced APIs that provide support for maps. To resolve this:

Updating Android Packages

Important to note!

Every time you update your Android packages, you will need to delete any AVDs that have been replaced by new revisions, otherwise they won’t be used. To do this, use the Android SDK Manager Tools > Manage AVDs menu item to launch the Android Virtual Device Manager.

Unless you have modified any AVD’s hardware configuration, it’s easier to simply clear all existing AVDs altogether. Thus, select each one in turn and click the delete button to do this.

Summary of Installed Android Packages

The following shows the minimum Android packages required by Titanium at the time of writing (Oct 2011). To compare yours, use the same filter options at the bottom.

Refer to Titanium Compatibility Matrix for the most up-to-date information about the software we currently support.

Labels
  • None