|Table of Contents|
This guide describes where to obtain and how to install the Google Android SDK and associated packages.
Compatibility and Download
Titanium requires the Android SDK Tools to be installed in order to allow you to develop Android applications.
Required Android Packages
The following packages, and the respective versions shown, must be installed to be able to develop for Android:
Android SDK / Target Android Platform
Each Titanium SDK supports a specific range of Android versions, as shown in the following table. The minimum Android API level must be installed to use the Titanium SDK. The Titanium SDK will not work with Android SDKs earlier than the minimum Android SDK version. The maximum SDK version in the table below represents the maximum Android SDK version that the Titanium SDK was tested against.
Most mobile device manufacturers have been licensed to use Google's enhanced API, which provides support for Maps and other functionality. If this is the case for your target devices, you will need to install the relevant Google packages, listed as Google APIs by Google Inc., Android API x... by the Android SDK Manager tool. In Titanium Studio, choose the SDKs with the naming format "Google APIs x.x" to use the enhanced APIs, or those without the "Google APIs" prefix otherwise.
Android SDK packages can be installed using the Android SDK Manager tool. See Installing and Updating Android theAndroid SDK for detailed instructions.
The default Android SDK can be configured using Titanium Studio's Preferences, and then selected per-project using the Run Configurations.
Android Native Add-on Module Development on Mac OS X
The Xcode command line tools are required to develop native Android add-on modules on Mac OS X.
See Installing and Updating iOS SDK: Installing Command Line Tools for detailed instructions.
Note that the typical filesystem location of this software can be found in the OS X Software Locations section of these guides.
Installing Android SDK Tools on OS X
Once you have downloaded the Android SDK Tools archive, double-click to extract it.
- rename the extracted folder to
android-sdk, if you wish to keep it in accordance with the Software Locations section above
- drag and drop the folder into the your home directory, to complete the installation
Note that the typical filesystem location of this software can be found in the Windows Software Locations section of these guides.
Installing Android SDK Tools on Windows
Once you have downloaded the Android SDK Tools Installer, double-click to run it.
Then proceed to the Installing and Updating Android theAndroid SDK section.
Installing Android Packages with Android SDK Manager
The Android SDK Tools package that has been installed contains the Android SDK Manager that is used to install the rest of the Android SDK packages.
To run an emulator for Android API level 14 or above, you must install one of the corresponding emulator system images. Starting in Titanium Studio Release 3.0, you can choose which system image to launch if you have multiple system images installed for a given API level.
For more information on using the x86 system images, see Installing and Updating Android theAndroid SDK.
Set the filter options at the bottom and select the required packages for installation.
Refer to the Titanium Compatibility Matrix for the latest list of required packages.
Installing x86 Emulator Packages
Some versions of the Android API are available with Intel x86 emulators. Look for the "Intel x86 Atom System Image" in the Android SDK Manager.
The x86 emulator may run faster than the standard ARM emulator, but may show minor differences with the ARM emulator. Extra software is required to take advantage of the x86 emulator – see Configuring Virtual Machine Acceleration in the Android Tools documentation.
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.
Configuring Titanium Studio
To use the Android SDK with Titanium Studio, the path to the SDK must be set in the Preferences dialog.
- Open the Preferences dialog:
- On Mac OS X, from the menu bar, select Titanium Studio > Preferences.
- On Windows and Linux, from the menu bar, select Window > Preferences.
- Navigate to the Android SDK settings:
- On Studio 3.1.0 and later, in the Preferences dialog, navigate to Titanium Studio > Platform > Android SDK.
- On Studio 3.0.x and earlier, in the Preferences dialog, navigate to Titanium Studio > Titanium, the Android SDK settings are under the Android section.
- Set your Android SDK path. Enter the path to your Android SDK in the Android SDK Home textbox or click the Configure button to navigate to the SDK directory.
- Select your default Android SDK. Select a Google APIs item from the Default Android SDK drop-down menu.
Configuring the CLI
To use the Android SDK with the Titanium CLI, the path to the SDK must be set in the Titanium CLI configuration settings. Run the following command and replace
/Users/appc/sdk/android-sdk/ with the path to your Android SDK: