Game Development Reference
In-Depth Information
Project ➤ Build Automatically enabled. With that setting enabled, your project will be compiled
incrementally every time you make a change. To autocomplete, just press Ctrl+Space.
One of the first things you'll notice as a new Android developer is that to deploy on a device, you
don't have to do too much other than enabling a setting. Any executable code on Android still
needs to be signed with a private key, just like in iOS, but the keys don't need to be issued from
a trusted authority like Apple, so the IDE actually creates a “debug� key for you when you run
test code on your device. This key will be different from your production key, but not having to
mess around with anything to get the application testing is very helpful. The key is located in the
user home directory under a sub-directory called .android/debug.keystore .
Like Xcode, Eclipse supports Subversion (SVN), though you'll need to install a plug-in. The most
common plug-in is called Subclipse, which is available at http://subclipse.tigris.org . All SVN
functionality is available either under the Team context menu option or by opening a view by
choosing Window ➤ Show View ➤ Other ➤ SVN. Check there first to get to your repositories
and start checking out or sharing projects.
Most everything in Eclipse is contextual, so you will want to right-click (or double-click/Ctrl-click)
the names of projects, files, classes, methods, and just about anything else to see what your
options are. For instance, running a project for the first time is best done by just right-clicking
the project name and choosing Run As ➤ Android Application.
Locating and Configuring Your Targets
Xcode can have a single project with multiple targets, like My Game Free and My Game Full,
that have different compile-time options and can produce different applications based on these
options. Android has no such thing in Eclipse, because Eclipse is project-oriented in a very flat
manner. To do the same thing in Android, you will need to have two different projects that share
all code except maybe one special piece of configuration code for that project. Sharing code is
very easy and can be done using the simple “linked source� features of Eclipse.
If you're used to Xcode plists and pages of configuration, you'll be happy to hear that
most everything you can possibly need in Android is located in one of two locations:
AndroidManifest.xml (covered in this chapter) and the project's Properties window. The Android
manifest file covers things very specific to the app, just like Summary and Info for the Xcode
target, and the project's Properties window covers features of the Java language (such as which
libraries are linked, where classes are located, etc.). Right-clicking the project and selecting
Properties presents you with a number of categories to configure from. The Android and Java
Build Path categories deal with libraries and source code dependencies, much like many of
the Build Settings, Build Phases, and Build Rules tab options in Xcode. Things will surely be
different, but understanding where to look can save a great deal of time.
Other Useful Tidbits
Of course there are more differences between XCode and Eclipse. The following list tells you
about those that we find most useful.
ï?®
Eclipse shows the actual filesystem structure, but caches many things about
it, so get good with the F5/refresh feature to get an up-to-date picture of
your project files.
 
Search WWH ::




Custom Search