We, Android developers, spend our days staring at a computer screen, most likely at one of Eclipse's windows. Eclipse is an amazing IDE in theory, but it never quite feels complete and polished, mostly due to the fact that it's powered by open source enthusiasts and is based almost entirely on plugins (if you want to get it to do anything useful, that is).

Being Android developers, the plugin we are using every day is ADT - Android Development Tools, written by Google engineers, mostly @tornorbye and @droidxav who I've been conversing over twitter lately and annoying with filing numerous ADT bugs (hi, if you're reading!). ADT isn't quite perfect yet, but these guys are trying their best to perfect it every day. The culmination of their latest efforts was the release of ADT 8.0.0 last week, timed to come out at the same time as the Gingerbread SDK.

Version 8.0.0 introduced the new Layout Editor and fixed numerous bugs, among other things, but more bugs remained and more features were left desired. Are we to wait for Honeycomb or something even more distant for the next version of ADT? No way - I've been filing bugs left and right, saw some of them get fixed in days, and now want to use a version of ADT without them, while enjoying all the new stuff that gets added every day.

Are you a hardcore developer with interest in the bleeding edge developments in the Android Development Tools? Add this ADT commitlog RSS feed to your reader and enjoy seeing those bugs getting squashed.

Rather than have us wait for months, the ADT dev team decided to start maintaining a bleeding edge, easily installable, hassle free package corresponding to a working ADT repository trunk. Sure, you can build ADT from source, but it's not a task every app developer would want to perform, plus you never know whether the trunk is in a good state or not. So, rather than wait for the next version to be released, just download and install it yourself - the whole process takes about 1 minute.

What's New In ADT 9.0.0-preview1?

The current version of ADT up on the download site is 9.0.0-preview1, which corresponds to the latest working trunk. The changes include, among other things, some of the bugs I've reported only this week, and it is especially awesome to be able to see the results so soon. I just love open source.

Looking at the changelist below, I'm mostly excited about the R.foo stuff I highlighted below. All I can say is, "finally!"

Changes since release 8.0.0:

  • Many bug fixes.
    • Of particular note, the launch feature in Eclipse will now properly work when the target device is running a production build. It will not complain that debuggable=true is missing from the Android Manifest anymore, since the build system inserts it automatically.
  • Go To Declaration hyperlink support: You can jump directly from code references such as "R.id.main" in Java code right into the corresponding XML declaration, as well as from XML attributes (like @string/name) to the corresponding resource definition, and from manifest XML registrations to activities and services, etc.
  • Improved support for empty and nested layouts. Dragging over nested and invisible layouts automatically enlarges and highlights these layouts such that they can receive drops.
  • Support for rendering targets. You can now choose an arbitrary Android platform to have the current page rendered with, regardless of the minimum platform chosen by the project. This makes it easy to check pages visually for different platforms.
  • XML formatting improvements: The XML edited by the tool should be much cleaner, and you can enable auto-formatting in the options.
  • Automatic configuration for various view types. As an example, you now automatically get match_parent width filling when you drop say an EditText into a vertical LinearLayout, you get a default image added to ImageButtons, etc.
  • Dragging from the palette, and dragging within the layout editor, now shows live previews of the dragged item rather than just a simple drag & drop cursor.
  • Improvements to the support for rename refactoring.
  • In the layout editor, double click views to warp to the corresponding XML element, and in the outline view, a double click will open the properties view.

Here are more details on the Go To Declaration hyperlink support:

  • In your Java code, if you see a symbol like R.id.button1, you can click on this to jump right to the layout definition of the view which defines id button1 (@+id/button1).
  • In the R file, you can jump right from "public static final int Button01=0x7f050000" to the corresponding button definition
  • In your Manifest file, you can jump from an activity definition (or service definition), such as <activity android:name=".TestActivity", right into the corresponding Java class
  • You can jump to any value definition (e.g. @string:foo), regardless of which XML file "foo" is defined in
  • In addition to values you can also jump to all the file-based declarations (e.g. @layout/bar)
  • You can jump to non-XML resources as well, such as @drawable/icon. This will launch whatever Eclipse opening mechanism exists for the given file type, in this case an image.
  • You can jump into @android namespace resources. This will open the resources found in the SDK install area.
  • From XML layouts, you can jump to custom view classes (e.g. <foo.bar.MyView></foo.bar.MyView> ), or  <view class="foo.bar.MyView")

We can finally have XML auto-formatted when edited by the Layout Edit/or! Wooo (it's not exactly what I thought it would be, but I'll settle for this too):


If you're interested in following the latest developments in bite-sized human-readable pieces, I highly recommend subscribing to the Android Tools blog.


Downloading and installing the latest ADT plugin is easy as pie:

  1. Download the latest release from this page (currently 9.0.0-preview1)
  2. Go to Eclipse > Help > Install New Software...
  3. Click Add...
  4. Click Archive... and select the zip you just downloaded
  5. Give it a name, say ADT-9.0.0-preview1 and press OK
  6. Follow the prompts, restart Eclipse, and voila - you are now running the latest and greatest (though, with some potential bugs)

And that's all, folks - enjoy! Thank you to the ADT team, specifically Tor and Xavier, for putting this together and maintaining the tools - you guys rock!

Source: @droidxav, @tornorbye