Android apps are typically written as Java classes. That source code is then compiled into bytecode that the Dalvik engine (a subset of a Java Virtual Machine) runs under the Android operating system. The following steps describe how to acquire and conﬁgure the tools you need to write your app’s Java classes and then test and package the app for deployment.
NOTE: By the time you read this, these instructions may have changed. Please refer to the Android Developers Website for current updates.
For Android app development you’ll need four basic toolsets:
- The Java Development Kit (JDK). This is the Software Development Kit (SDK) for Java and provides the foundation for the Android SDK.
- Android SDK. This consists of all the tools you need to develop and test your app:
- Eclipse + ADT plugin
- Android SDK Tools
- Android Platform-tools
- The latest Android platform
- The latest Android system image for the emulator
- Eclipse IDE (integrated development environment). Included in the Android SDK download, the Eclipse IDE provides the “hands-on” controls you need for writing your app using Java, the Android SDK and the Android ADT.
- Android ADT (Android Development. Tools) This Eclipse plug-in performs much of the housekeeping involved in creating an Android app such as creating the needed ﬁles and overall structure.
Installing the JDK To install the oﬃcial Oracle Java SE SDK (JDK) for Windows, OS X, and Linux go to the Oracle Java website and follow the instructions.
Installing the Android SDK. At this point you still need to acquire the Java ﬁles needed to compile an Android app as well as some additional build tools and the ﬁles required to run an Android emulator. To access these add-ons, look inside the tools/ directory of the Android SDK you just downloaded and run the Android batch ﬁle or shell script. That opens the Android SDK Manager. Make sure the following items are checked and then click Install.
- “SDK Platform” for all Android SDK releases you want to test against
- “ARM EABI v7a System Image”
- “Documentation for Android SDK”
- “Samples for SDK”
- “Google APIs by Google Inc.” for the Android SDK release you’re downloading
- Android SDK Tools and Platform-tools
- Android Support package (in the Extras group at the bottom of the tree)
One shortcut that many developers like to use is to install everything with a single command. Just type the following command at the command line:
android update sdk –no-ui
This will perform a full install of all Android versions and samples along with all system images. Obviously, this approach takes up the most amount of space on the system.
Once all the selected items are installed (it may take several hours if you have a slow Internet connection), you are ready to begin making your Android app!