I get a lot of questions about getting started with Android development so I thought I would publish a short summary of what you need to get started.To get started go check out some of the videos on the Android developer site.
Video Overview:
Operating System
You can develop Android applications on Windows, Mac and Linux. And all of the tools you need are free! Yes, free. No annual fees, or expensive IDE's to purchase. In a nutshell any version of windows starting from XP on will work, Mac 10.4.8 and above and Linux. It wouldn't hurt to have an Android phone to test on, but it isn't absolutely required. It would be a very good idea to test your apps on real devices first because the emulator is just that--an emulator. Also, if you are an every day user of an Android phone you are more likely to be able to related to your users and create useful or entertaining applications that might appeal to them.
The full list of requirements can be found on the Android site.
Software Tools and SDK Android development is accomplished via Java, so you will need a Java programming environment. This is comprised of the Java Development Kit (JDK) and the highly suggested Eclipse IDE is recommended along with the Android SDK. I would strongly suggest that you follow the suggested path at first and if you choose to go in another direction, do so at your own risk.
Step 1
Ensure you have the Java Development Kit (JDK) and if not, go download it from Sun and install it. The easiest way to check is to open a command prompt or terminal window and type "javac". If you don't get an error then you know you have the JDK installed. Even so, you may want to add the -v switch to check what version you are running and update if necessary. The JRE (Java Runtime Environment) is not enough to do Android development, you need the full JDK.
Download the JDK from Sun.
Step 2
Get the Eclipse IDE for Java EE Developers (~188 Mb). The reason you need the Java EE IDE is because it has two very important plugins already installed (JDT and WTP). If you are just starting out this is the easiest path to take and honestly it really doesn't hurt to have the other EE components installed anyway.
Download Eclipse
Step 3
Go get the Android SDK and install it in a directory of your choice. The SDK is basically a bunch of files containing the classes and other files for the SDK. This is a manual install, so just unzip it in a directory of your choice. I would suggest that you locate it in a logical place because you will need to add its path to the Eclipse development environment as well as update your PATH variable.
Download and Install SDK
Be sure to read up on the notes regarding the way the SDK now operates.
Notes on Installing the SDK
Step 4
Next, you will need to launch Eclipse now that the JDK, Eclipse IDE and Android SDK is installed. In this last step you will be installing the Android Development Tool (ADT) plugin for Eclipse and getting your IDE configured for development.
You will need to update your PATH variable to include the path to this SDK/tools directory. This is where the SDK tool binaries live and you will need them moving forward. If you don't know how to update your PATH variable for your platform, just google it. To test to make sure you have your path updated, open a terminal or command window and type "android". If the Android update manager appears then your path is correct. Just cancel that for now and move to the last step.
The ADT (Android Development Tool) extends the capabilities of Eclipse to let you quickly set up new Android projects, create an application UI, add components based on the Android Framework API, debug your applications using the Android SDK tools, and even export signed (or unsigned) APKs in order to distribute your application.
Here are some notes from the Android development portal about installing and configuring the ADT that you may want to review. I find these to not be completely in sync with the latest tools and software, but it is a source of good information.
To update Eclipse with the ADT plugin follow these steps:
1. Launch Eclipse.
2. Select Help, Software Updates.
3. Select the Available Software tab.
4. Click the Add Site button.
5. Add a remote site: https://dl-ssl.google.com/android/eclipse/
If the site fails, try http://dl-ssl.google.com/android/eclipse/
6. On the Available Software Updates tab, check the Android site you just added.
7. Press the Install button.
8. Follow the installation instructions and install the Android Plug-In.
9. Restart Eclipse after the software update completes.
After you install the Android SDK Eclipse Plug-In, you should update your Eclipse preferences to point at the Android SDK. This is VERY important... so don't forget.
To do this, launch Eclipse and choose Window, Preferences (or Eclipse, Preferences on Mac OS X). Select the Android preferences and set the path to where you installed the Android SDK.
And, you are ready to develop some Android applications...welll, almost! There are a couple minor details such as adding a AVD (Android Virtual Device) for testing with your emulator and how to setup and configure your first Android project inside Eclipse as well as making some changes to your Android phone and the manifest configuration file so that you can test on your device. I will cover these important topics in my first tutorial "Hello Android!".
New Update for Windows Vista Developers:
This tip was provided by one of my subscribers.
After installing Eclipse, Android SDK, and ADT, I found the emulatordid not work, with ADB giving the error message that the AVD could not be found. Everything seemed to work otherwise: I could run Eclipse, set up new AVDs, created apps, etc. I just couldn't get the AVD manager to remember where it created the AVDs, i.e., it was looking elsewhere.
Eventually, I figured out that if my home directory (folder) is not the default in the C: drive (mine is in my data partition D:\
registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
This variable is what AVD Manager uses to find the .android folder.
Resources
There are many resources on the Android Developer Site, but here are a few that you will find very helpful when getting started.
Developer Guide
Package Reference Guide
Android Hello World
I hope you found this article helpful in getting you started with Android development. Stay tuned for many more articles and video tutorials.
At the time of this article my T-Mobile Android MyTouch is running 1.6, however 2.X is out in the wild. The reason I mention this is because you will likely want to setup your development for 1.6 and then use the Android SDK manager to add on new code bases as needed for 2.0 and beyond.
Tim