Sams Teach Yourself Java™ in 24 Hours (Covering Java 7 and Android)

(singke) #1
ptg7068951

390 APPENDIX D:Setting Up an Android Development Environment


Installing Eclipse
Though other IDEs such asNetBeans offer Android development support,
Eclipse has emerged as the most common choice for writing apps for
Android. Android’s developers have designated Eclipse as the preferred
environment and employ it throughout their official documentation and
tutorials.
Eclipse, like NetBeans, provides a graphical user interface for writing Java
programs. You can use it to create any kind of Java program (and it sup-
ports other programming languages as well).
Android requires Eclipse 3.5 or later.
To download Eclipse, visit http://eclipse.org/downloads.
Several different versions of the IDE are available. Pick the Eclipse IDE for
Java EE Developers. Java EE is the Java Enterprise Edition, and this version
of Eclipse includes two things you use on Android projects: Eclipse’s Java
Development Tools (JDT) plug-in and the Web Tools Platform (WTP).
Eclipse is packaged as a ZIParchive file. There’s no installation program to
guide you through the process of setting it up on your computer. The ZIP
archive contains a top-level eclipsefolder that holds all of the files you
need to run Eclipse.
Unzip this to the folder where you store programs. On my Windows sys-
tem, I put it in the Program Files (x86)folder.
After unzipping the files, go to the eclipsefolder you just created and
look for the executable Eclipse application. Create a shortcut to this appli-
cation and put it in your menu or somewhere else where you run pro-
grams, such as the desktop or taskbar.
Before launching Eclipse, you shouldinstall the Android SDK.

Installing Android SDK
The Android SDK is a free set of tools used to create, debug, and run
Android applications. The SDK is used by Eclipse as you’re working on
Android apps.
You can download the SDK from the official Android website at
http://developer.android.com/sdk. It’s available for Windows, Mac OS,
and Linux.

NOTE
Eclipse also is used in popular
tutorials for Android program-
ming such as Sams Teach
Yourself Android Application
Development in 24 Hours,
Second Edition,by Lauren
Darceyand Shane Conder
(ISBN 0-672-33569-7). You can
move from this book straight
into that one because the tools
being set up in this appendix
are used in that book as well.
I’ve read the book and recom-
mend it highly as a follow-up to
this one.

Free download pdf