This article was re-printed with permission from Amazon Digital Services, Inc.
The Amazon Mobile App SDK Eclipse Plugin allows you to easily integrate Amazon APIs into your Android Eclipse project by setting up the needed components for you. With the Eclipse plugin, you can add or remove Amazon APIs from your project and make sure APIs in the project are configured correctly.
For each API, the Eclipse plugin does one or more of the following:
- Includes the API library as a compile-time or runtime dependency. The Eclipse plugin ensures that the required API library files are available in your project build path. It puts API library files under the
amazon-libsdirectory in your project and creates one or more Eclipse
classpathcontainers for the libraries. For runtime dependencies, it marks the
classpathcontainers as exported.
- Includes resources files in your project
resdirectory, and includes assets files in your project
- Adds any required elements, such as permissions, to the
AndroidManifest.xmlfile for your project.
- Cleans up as needed if you decide to disable the API.
The steps for installing the Eclipse plugin assume that you have the following installed on your development computer:
- Eclipse version 3.7.x (Indigo) or above
- Android Development Tools (ADT) (revision 21.x.x or later recommended)
- The latest version of the Amazon Mobile App SDK. Versions of the SDK that work with the Eclipse plugin include a
spec.yamlfile in the
toolsfolder of each of the APIs.
Make note of your SDK path, because you must provide it when installing the Eclipse plugin.
Installing the Amazon Mobile App SDK Eclipse Plugin
Complete the following steps to set up the Eclipse plugin.
- In Eclipse, on the Help menu, click Install New Software.
- In the Install window, click Add. In the dialog box, enter the following values, and then click OK.
Amazon Mobile App SDK PluginLocation http://developer.amazon.com/eclipse
- Select the Amazon Mobile App SDK check box.
Make sure that the Show only the latest versions of available software check box is selected.
- Click Next, then follow the instructions in the installation wizard to complete the wizard, including accepting the terms of the license agreement.
If a Selection Needed window appears asking
Do you trust these certificates?, select the Amazon.com Inc. check box, and then click OK.
- When prompted, restart Eclipse to make sure that the Eclipse plugin is active.
- In Eclipse, on the Window menu (on a Mac, on the Eclipse menu), click Preferences, and then click Amazon Mobile App SDK.
- In the SDK Location box, specify the path where you installed the Amazon Mobile App SDK, and then click OK.
Adding or Removing Amazon APIs by Using the Eclipse Plugin
To use the Eclipse plugin with your Android project, do the following:
- In your Eclipse workspace, open an Android project.
- On the Project menu, click Properties.
- Click Amazon Mobile App SDK.
- Select the check box next to the Amazon API that you want to use in your project, and then click OK.
To remove an API from your project, clear the check box next to the API, and then click OK.
If you do not see Amazon Mobile App SDKin project properties or do not see the check boxes for the Amazon APIs, review the steps for installing the Eclipse plugin. Verify that you have the correct SDK version and that you specified the correct path for your SDK location.
This article was re-printed with permission from Amazon Digital Services, Inc. This site does business with Amazon Digital Services, Inc.