Before you can start developing Android apps, you need to first get the tools. The most basic software tool that you need is called an SDK (software development kit). This can be downloaded from http://developer.android.com/sdk/index.html.
Select your development platform and download the proper file. You can also read the “Installing the SDK” guide on the same webpage. I suggest that you keep the development kit to a minimum and not to install Eclipse.
The SDK includes the basic tools to help you develop Android applications. However, it does not contain everything that you need. The Java compiler that is needed is not an Android product. Instead, it is an Oracle (formerly Sun Microsystem) product. Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html and download the JDK (Java Development Kit). Note that the JRE (Java Runtime Environment) is not sufficient because it does not include the compiler.
Last, but not least, you need to install at least one Android platform by running the command android. The platform that you select depends on the target device(s) of your application. For starters, the Android 2.1 platform is sufficient.