Setting Up Your Development Environment

Introduction

Before you can start developing mobile apps for Kindle Fire tablets, you must first set up your development environment. The setup involves installing the following software packages on your development computer:

  • Java Development Kit (JDK) (required)
  • Android SDK (required)
  • Eclipse integrated development environment (IDE) (recommended)
  • Kindle Fire device and emulator dependencies (required)

Before you begin, review the minimum requirements for developing Android applications on the Android SDK download page.

Note: The Android SDK, Eclipse, the Java Development Kit, and certain other development tools are provided by third parties, not by Amazon. Our links for these tools will take you to third-party sites for download and installation of the tools.


System Requirements for the Kindle Fire Emulator

Verify that your development computer has the following system configuration to support the Kindle Fire emulator:

  • An Intel processor that supports supports virtualization extensions (VT-x), so that you can use the x86 system images for faster emulation.
    To determine the capabilities of your Intel processor, visit http://ark.intel.com/.
  • Windows 7 or Mac OS X 10.7.
  • On Windows systems, a graphics card that supports DirectX 11 (or OpenGL 4.1) or later, so that the emulator can use the GPU for improved graphics performance.
    Make sure that you configure your computer to use the graphics card and install the latest graphics drivers.
  • At least 4 GB of system memory, including at least 1.25 GB free to run the emulator.

On Mac OS X systems, there is no specific graphics card requirement.


Installing the JDK

To use the Android SDK, your development computer must have the Java Development Kit version 6 (JDK 6) or later installed. Find the JDK installer on the Java SE Downloads page.

To verify the JDK version on your system, open a command prompt window or terminal window. Run the following command:

java -version                
                

This command returns the JDK version number, for example java version "1.6.0_xx" for JDK 6.

Note: On Windows, you may need to change directory to the JDK bin directory before running the java -version command, because the Java binaries may not be on your system path. An example bin directory for the 32-bit JDK is <SYSTEM DRIVE>:\Program Files (x86)\Java\jdk<version>\bin.


Installing the Android SDK and Eclipse IDE

If you already have Eclipse installed and want to add the Android SDK, in the Android documentation see Setting Up an Existing IDE.

To install a bundle that includes the Eclipse IDE with built-in Android Developer Tools (ADT), follow the steps to download and install the appropriate Android SDK bundle for your system. If the 64-bit JDK is installed, you need to install the 64-bit Android SDK bundle. With the 32-bit JDK, install the 32-bit Android SDK bundle.

Make note of the destination folder where you install the Android SDK. For the Android ADT bundle on Windows, the path is <your-chosen-directory>\adt-bundle-windows\sdk\. On OS X, the path is  /<your-chosen-directory>/adt-bundle-mac/sdk/.


Installing Kindle Fire Device and Emulator Dependencies

Take the following steps to install the software packages for Kindle Fire.

  1. In Eclipse, on the Window menu, click Android SDK Manager.
    - or -
    On the command line, run the following command, where <ANDROID_SDK> is the path to your Android SDK:
     $ <ANDROID_SDK>/tools/android
    
  2. In the Android SDK Manager window, verify that SDK Path points to the path for your Android SDK.
    To modify the path, in Eclipse, on the Window menu, click Preferences, click Android, and then update the SDK Location.
    Note: In Mac OS X, these menu items are on the ADT menu instead of the Window menu.
  3. In the Android SDK Manager window, on the Tools menu, click Manage Add-on Sites. Click the User Defined Sites tab, and then click New.
    Note: In Mac OS X, when the Android SDK Manager window is open, the Tools menu appears in the parent Eclipse window instead of the Android SDK Manager window.
  4. In the Add Add-on Site URL dialog box, enter the following URL:
    http://kindle-sdk.s3.amazonaws.com/addon.xml
  5. Click OK, and then click Close.
    Wait for the Android SDK Manager to refresh, as indicated by the progress bar.
  6. In the Android SDK Manager window, select the latest revision of each of the following packages.
    Note: Select at least one Kindle Fire emulator package, which includes an emulator system image and also includes the vendor identification needed for the Android Debug Bridge (ADB) to recognize a physical Kindle Fire tablet for testing and debugging.
    • Tools:
      • Android SDK Tools (install the latest version)
      • Android SDK Platform-tools (install the latest version)
    • Android API versions later than 4.2.2 API 17:
      • Note: You can install and target SDK platform versions later than Android 4.2.2. However, regardless of the target SDK version you choose for your app, you need to verify that your app runs correctly on the Kindle Fire emulator and tablets.
    • Android 4.2.2 API 17:
      • SDK Platform
      • ARM EABI v7a System Image (emulator prerequisite for ARM system images)
      • Intel x86 Atom System Image (emulator prerequisite for x86 system images)
      • Kindle Fire HD 7" (3rd Generation) (ARM and x86 system images for emulator)
      • Kindle Fire HDX 7" (3rd Generation) (ARM and x86 system images for emulator)
      • Kindle Fire HDX 8.9" (3rd Generation) (ARM and x86 system images for emulator)
    • Android 4.0.3 API 15:
      • SDK Platform
      • ARM EABI v7a System Image (emulator prerequisite for ARM system images)
      • Intel x86 Atom System Image (emulator prerequisite for x86 system images)
      • Kindle Fire (2nd Generation) (ARM and x86 system images for emulator)
      • Kindle Fire HD 7" (ARM and x86 system images for emulator)
      • Kindle Fire HD 8.9" (ARM and x86 system images for emulator)
    • Android 2.3.3 API 10:
      • SDK Platform
      • Kindle Fire (ARM system image for emulator)
    • Extras:
      • Kindle Fire Device Definitions
      • Kindle Fire USB Driver (not applicable for OS X)
      • Android Support Library
      • Intel x86 Emulator Accelerator (HAXM) (emulator prerequisite for x86 system images)
      • Amazon AVD Launcher
  7. Click Install n packages.
  8. In the Choose Packages to Install dialog box, accept the license agreements for the packages, and then click Install.
  9. Wait for the packages to install, and then close the Android SDK Manager window after installation is complete.
  10. Restart Eclipse or the AVD Manager, if running.

Setting Up the x86 System Images for Faster Kindle Fire Emulation

Take the following steps to set up your Windows or Mac OS X development computer to use the x86 system images for the emulator.

  1. Enable virtualization extensions on your development computer.
    Typically, you can enable virtualization extensions in the system BIOS. You must have permissions to change BIOS settings. For information about how to do this, see the documentation for your computer system. For further information about enabling virtualization extensions on Windows and OS X, in the Android documentation, see Configuring Virtual Machine Acceleration.
  2. Run the installer for the Intel Hardware Accelerated Execution Manager (HAXM) that you downloaded to your Android SDK extras/intel/Hardware_Accelerated_Execution_Manager directory during SDK installation.
    Note: If the HAXM installer is not available under extras, verify in Android SDK Manager that you added the Intel x86 Emulator Accelerator (HAXM) package.
  3. Restart Eclipse or the AVD Manager, if running.

If your app uses native code, to run the app on an x86 system image, all the native libraries built into your app need to be compiled for x86. For information about x86 emulation with native code, see Running Native Code on Kindle Fire x86 System Images.

If your development computer does not meet the requirements for using the x86 system images, use the ARM system images instead. For more information, see Improving Kindle Fire Emulator Performance.


Updating Components for the Kindle Fire Emulator (Windows only)

If you are using a Windows computer, you need to update your emulator installation to improve the stability of the Kindle Fire emulator. Do the following each time you update your Android SDK tools on Windows.

  1. Download the updated emulator components for Windows.
  2. If you are using the ADT Bundle, extract the emulator.exe, emulator-arm.exe, and emulator-x86.exe files to the <ADT_BUNDLE>\sdk\tools\ directory.
    - or -
    If you are using the standalone Android SDK, extract the emulator.exe, emulator-arm.exe, and emulator-x86.exe files to the <ANDROID_SDK>\tools\ directory.
    Note: Rename the existing files on your development computer if you want to keep a copy of the original emulator components.

Native Code Development (Optional)

Kindle Fire tablets support apps that include native code compiled with the Android NDK. The following table shows the NDK revision for compiling your native-code apps to take advantage of the features available on a Kindle Fire tablet. For information about installing the NDK, in the Android documentation see Android NDK.

Tablet Compile native-code apps with
Kindle Fire HDX 8.9" (3rd Gen)
Kindle Fire HDX 7" (3rd Gen)
Kindle Fire HD 7" (3rd Gen)

Android NDK Revision 8e or later
Kindle Fire HD 8.9" (2nd Gen)
Kindle Fire HD 7" (2nd Gen)
Kindle Fire 7" (2nd Gen)

Android NDK Revision 7 or later
Kindle Fire (1st Gen) Android NDK Revision 5 or later

Next Steps

After you've set up your environment, you can test and debug your app on the Kindle Fire emulator or on a tablet. For more information, see Running the Kindle Fire Emulator and Setting Up Your Kindle Fire Tablet for Testing.


Return to Kindle Fire
Unavailable During Maintenance