Welcome to Android application development!
This class teaches you how to build your first Android app. You’ll learn how to create an Android project and run a debuggable version of the app. You’ll also learn some fundamentals of Android app design, including how to build a simple user interface and handle user input.
Before you start this class, be sure you have your development environment set up. You need to:
- Download the Android SDK.
- Install the ADT plugin for Eclipse (if you’ll use the Eclipse IDE).
- Download the latest SDK tools and platforms using the SDK Manager.
If you haven’t already done these tasks, start by downloading the Android SDK and following the install steps. Once you’ve finished the setup, you’re ready to begin this class.
Download the ADT Plugin
- Start Eclipse, then select Help > Install New Software.
- Click Add, in the top-right corner.
- In the Add Repository dialog that appears, enter “ADT Plugin” for the Name and the following URL for the Location:
- Click OK.If you have trouble acquiring the plugin, try using “http” in the Location URL, instead of “https” (https is preferred for security reasons).
- In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
- In the next window, you’ll see a list of the tools to be downloaded. Click Next.
- Read and accept the license agreements, then click Finish.If you get a security warning saying that the authenticity or validity of the software can’t be established, click OK.
- When the installation completes, restart Eclipse.
Configure the ADT Plugin
Once Eclipse restarts, you must specify the location of your Android SDK directory:
- In the “Welcome to Android Development” window that appears, select Use existing SDKs.
- Browse and select the location of the Android SDK directory you recently downloaded.
- Click Next.
If you haven’t encountered any errors, you’re done setting up ADT and can continue to Next Steps.
Updating the ADT Plugin
From time to time, a new revision of the ADT Plugin becomes available, with new features and bug fixes. Generally, when a new revision of ADT is available, you should update to it as soon as convenient.
In some cases, a new revision of ADT will have a dependency on a specific revision of the Android SDK Tools. If such dependencies exist, you will need to update the SDK Tools package of the SDK after installing the new revision of ADT. To update the SDK Tools package, use the Android SDK Manager, as described in Exploring the SDK.
To learn about new features of each ADT revision and also any dependencies on the SDK Tools, see the listings in theRevisions section. To determine the version currently installed, open the Eclipse Installed Software window using Help >Software Updates and refer to the version listed for “Android Development Tools”.
Follow the steps below to check whether an update is available and, if so, to install it.
- Select Help > Check for Updates.If there are no updates available, a dialog will say so and you’re done.
- If there are updates available, select Android DDMS, Android Development Tools, and Android Hierarchy Viewer, then click Next.
- In the Update Details dialog, click Next.
- Read and accept the license agreement and then click Finish. This will download and install the latest version of Android DDMS and Android Development Tools.
- Restart Eclipse.
If you encounter problems during the update, remove the existing ADT plugin from Eclipse, then perform a fresh installation, using the instructions for Installing the ADT Plugin.