Setting Up Your Kindle Fire Development Environment
This article was re-printed with permission from Amazon Digital Services, Inc.
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)
- Core Android SDK add-ons (required)
- Kindle Fire SDK add-ons for the emulator and USB support (recommended)
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.
Installing the JDK
To use the Android SDK, your development computer must have the Java Development Kit version 6 (JDK 6) installed.
To verify that JDK 6 is available on your system, open a command prompt window or terminal window. Run the following command:
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.
If JDK 6 is not installed, find the JDK 6 installer for your system on the Java SE Downloads page. Choose the most recent update for JDK 6.
Installing the Android SDK and Eclipse IDE
In the Android documentation, 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. The bundle includes a version of the Eclipse IDE and a built-in Android Developer Tools (ADT) plugin.
If you already have Eclipse installed and want to add the Android SDK, in the Android documentation see Setting Up an Existing IDE.
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
Setting Up the x86 System Images for Faster Emulation
You should set up the x86 system images for the Kindle Fire emulator as a faster alternative to ARM-based emulation, if your development computer running Windows or OS X has an Intel processor that supports virtualization extensions (VT-x). To determine the capabilities of your Intel processor, visit http://ark.intel.com/. Typically, the better the overall processor performance, the better the emulator performance.
The x86 system images are available for Kindle Fire (2nd Generation), Kindle Fire HD 7", and Kindle Fire HD 8.9". The performance of an x86 system image can be comparable to a physical Kindle Fire tablet when the emulator is running on a development computer that has a sufficiently capable processor and GPU. Using an x86 system image eliminates the translation of ARM to x86 instructions that occurs at runtime when using the ARM-based emulator.
To use the x86 system images, you need to 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. You should verify that you can enable virtualization extensions prior to downloading and installing SDK packages, so that you know whether you can use the x86 system images.
After enabling virtualization extensions, follow the steps for installing the SDK add-ons, and then run the installer for the Intel Hardware Accelerated Execution Manager (HAXM) that is downloaded to your Android SDK
extras/intel/Hardware_Accelerated_Execution_Manager directory during SDK installation.
Note: If you previously set up your development environment, you can use Android SDK Manager to make sure that you get the latest revision of the following packages. Then, install HAXM. Restart Eclipse or the AVD Manager, if running.
- Intel x86 Atom System Image
- Kindle Fire (2nd Generation)
- Kindle Fire HD 7"
- Kindle Fire HD 8.9"
- Intel x86 Emulator Accelerator (HAXM)
For further information about enabling virtualization extensions on Windows and OS X, in the Android documentation, see Configuring Virtual Machine Acceleration.
For a development computer running OS X, there is an issue with the x86 hardware virtualization technology that may affect the x86 system images and can lead to problems including a system crash. The issue is not specific to Kindle Fire emulation. If you encounter this issue, use the ARM-based system images and watch http://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager for updates.
If your development computer does not meet the requirements for using the x86 system images, you can instead use the ARM system images or physical Kindle Fire tablets.
Installing SDK Add-Ons
Take the following steps to install the SDK add-ons for Kindle Fire.
- 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:
- 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 OS X, these menu items are on the ADT menu instead of the Window menu.
- 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.
- In the Add Add-on Site URL dialog box, enter the following URL:
- Click OK, and then click Close.
Wait for the Android SDK Manager to refresh, as indicated by the progress bar.
- In the Android SDK Manager window, select the latest revision of each of the following packages.
Note: If you are not going to use the Kindle Fire emulator because you intend to test your app exclusively on a physical Kindle Fire tablet, you must still select one of the packages for the Kindle Fire system images. Each Kindle Fire package includes the vendor identification needed for the Android Debug Bridge (ADB) to recognize any of the physical Kindle Fire tablets for testing and debugging.
- Android SDK Tools (install the latest version)
- Android SDK Platform-tools (install the latest version)
- Android API versions later than 4.0.3 API 15:
- Note: You can install and target SDK platform versions later than Android 4.0.3. For example, the Android SDK bundle has a version of the SDK platform already installed. However, regardless of the target SDK version you choose for your app, you must verify that your app runs correctly on the Kindle Fire emulator and tablets.
- 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)
- 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)
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.
Native Code Development
Kindle Fire tablets support apps that include native code compiled with the Android NDK. To take advantage of all features available on Kindle Fire (2nd Generation), Kindle Fire HD 7”, and Kindle Fire HD 8.9”, compile your native-code apps with Android NDK Revision 7 or later. Similarly, compile native-code apps for Kindle Fire (1st Generation) with Android NDK Revision 5 or later. For information about installing the latest revision of the NDK, in the Android documentation, see Android NDK.
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.
This article was re-printed with permission from Amazon Digital Services, Inc. This site does business with Amazon Digital Services, Inc.