21
Mar
image

About a month ago, Google released the first preview versions of the latest ADT Eclipse plugin and SDK Tools which brought improvements and fixes to Proguard, Lint, and a few other cool things, like Network Usage. Today, the final versions, 17.0.0 (for ADT) and r17 (for SDK Tools), along with Support Package r7 are available for download from the SDK Manager or as part of the Android SDK.

The final release notes are as follows.

ADT 17.0.0

General improvements:
  • New build features

    • Added feature to automatically setup JAR dependencies. Any .jar files in the /libs folder are added to the build configuration (similar to how the Ant build system works). Also, .jar files needed by library projects are also automatically added to projects that depend on those library projects.
    • Added a feature that allows you to run some code only in debug mode. Builds now generate a class called BuildConfig containing a DEBUG constant that is automatically set according to your build type. You can check the (BuildConfig.DEBUG) constant in your code to run debug-only functions.
    • Added support for custom views with custom attributes in libraries. Layouts using custom attributes must use the namespace URI http://schemas.android.com/apk/res-auto instead of the URI that includes the app package name. This URI is replaced with the app specific one at build time.
  • Improved Lint features. See the SDK Tools r17 release notes.
  • Improved the Lint user interface
    • Added Run Lint toolbar action with a dropdown menu for selecting specific (or all) projects, clearing results and other actions.
    • Updated the results window to be organized as a tree rather than a flat list. Each issue type has a single top level item, which makes it easier to quickly scan through the reported issues and narrow down to the issues you are most interested in.
    • Added many new toolbar actions to the results window, including expand/collapse, ignore in file, ignore in project, ignore everywhere, show options, and configure columns.
    • Added new column options for the Lint Warnings tab, such as category, priority, project, file and line. The column selection (as well as the column sizes) are persisted. You can also click on columns to sort by those values.
    • Added Enable All and Disable All buttons to the Lint Options dialog, and a search filter textbox to filter by issue id, summary and severity.
  • Added Quick Outline for XML editors (Ctrl-O, Command-O). This feature shows the structure of the current file including icons and ids, lets you filter and quickly jump to specific ids.
  • Updated the resource chooser to shows the resolved value for resources. For example, when selecting @string/hello the chooser displays a resolved value such as "Hello World"). The resource chooser also now allows you to edit the chosen value directly.
  • Updated Layout Editor so that it does not assign default ids to layouts, includes and merge tags. This behavior tended to pollute the namespace with a lot of unused resources since layouts are not usually manipulated via code, or referenced from XML. (The RelativeLayout editor automatically assigns ids to views without ids when pointing to them.)
  • Added ability to export screenshots from the Layout Editor
Bug fixes:
  • Fixed problem using Layout Editor with SlidingDrawer which could not be dragged into the layout on some platforms.
  • Fixed preview rendering for SlidingDrawer and TabHost. (Issue 23022).
  • Fixed issues that could prevent layout rendering due to unresolvable resources. (Issue 21046, Issue 21051)
  • Fixed a bug in resource chooser which made some types of framework resources impossible to select. (Issue 20589)
  • Fixed a bug in the formatter where a certain whitespace pattern could result in a non-space character getting deleted. (Issue 23940)
  • Fixed a locale bug affecting Turkish locales in particular. (Issue 23747)
  • Fixed issue where dex complains about duplicate classes in cases where a Library Project depends on the same jar files or Java-only projects.
  • Fixed issue where test projects had to independently reference the library projects used by an app project. Now referencing only the app project is enough.

SDK Tools r17

General notes:
  • Emulator

    • Added support for hardware accelerated graphics rendering. This feature requires an API Level 15, Revision 3 or later system image. (more info)

      Note: As of the SDK Tools Revision 17 release, the API Level 15, Revision 3 system image is not yet available.

    • Added support for running Android x86 system images in virtualization mode on Windows and Mac OS X. (more info)
    • Added experimental support for multi-touch input by enabing the emulator to receive touch input from a USB-tethered physical Android device. (more info)
  • Added viewing of live detailed network usage of an app in DDMS. (more info)
  • ProGuard
    • Updated the bundled ProGuard tool to version 4.7. In addition to many new features, this update fixes the Conversion to Dalvik format failed with error 1 error some users have experienced.
    • Updated the default proguard.cfg file with better default flags for Android.
    • Split the ProGuard configuration file has been in half, with project specific flags kept in project and the generic Android flags distributed (and updated) with the tools themselves.
  • Build
    • Added a feature that allows you to run some code only in debug mode. Builds now generate a class called BuildConfig containing a DEBUG constant that is automatically set according to your build type. You can check the (BuildConfig.DEBUG) constant in your code to run debug-only functions.
    • Fixed issue when a project and its libraries include the same jar file in their libs folder.
    • Added support for custom views with custom attributes in libraries. Layouts using custom attributes must use the namespace URI http://schemas.android.com/apk/res-auto instead of the URI that includes the app package name. This URI is replaced with the app specific one at build time.
  • Lint
    • Updated Lint to check Android application code. Lint rules which previously performed pattern based searches in the application code (such as the unused resource check) have been rewritten to use the more accurate Java-style parse trees.
    • Added support for checking library projects. This change means that rules such as the unused resource check properly handle resources declared in a library project and referenced in a downstream project.
    • Added ability to suppress Lint warnings in Java code with the new @SuppressLint annotation, and in XML files with the new tools: namespace and ignore attribute. (more info)
    • New Lint checks:
      • Added check for Android API calls that require a version of Android higher than the minimum supported version. You can use the new @TargetApi annotation to suppress warnings when the code is wrapped in a system version condition. (more info)
      • Added over 20 new Lint rules, including checks for performance, XML layouts, manifest and file handling.

Support Package r7

Changes for v4 support library:
  • Added ShareCompat, which provides helper classes for sending and receiving content for social sharing applications, including new metadata for attributing shared data to the source app. This class also provides compatible integration with the new ShareActionProvider in Android 4.0.
  • Added NavUtils and TaskStackBuilder to provide support for implementing the Android Design guidelines for navigation. These additions include a way to implement the action bar's Up button across versions. For an example implementation of this pattern, see the AppNavigation sample in (<sdk>/samples/<platform>/AppNavigation).
  • Added NotificationCompat.Builder to provide a compatibility implementation of Android 3.0's Notification.Builder helper class for creating standardized system notifications.

As I said a month ago, I'm mostly excited about the new network usage tool, the fix for the dreaded "Conversion to Dalvik format failed with error 1" error when trying to use Proguard (which attributes to many wasted hours), and the end to default ids for various layout elements.

Update: We now also have a hardware accelerator emulator! Fascinating, if it really works.

Sources: ADT, SDK Tools, Support Package, Android Developers Blog

Artem Russakovskii
Artem is a die-hard Android fan, passionate tech blogger, obsessive-compulsive editor, bug hunting programmer, and the founder of Android Police.
Most of the time, you will find Artem either hacking away at code or thinking of the next 15 blog posts.

  • Mark

    YES, THE NEW EMULATOR IS OUT, YAY FOR FULL SPEED ANDROID EMULATION W/ OPENGL SUPPORT

  • Davor

    Emulator with gpu enabled crashes for me, if I set tablet size 4.0.3.

  • Atis

    I ugraded to r17 and now I can't run my game. It throws a ClassDefNotFoundException for my GameActivity. Any suggestions?

  • http://xrigau.wordpress.com/ Xavi Rigau

    I did a quick post on my blog explaining how to fix that problem, it has to do with libraries. You can check it here: http://xrigau.wordpress.com/2012/03/22/fix-some-problems-with-libraries-in-the-adt-17-plugin-10/

  • Jon

    Emulator for 4.0.3 crashes for me too :(
    Kubuntu 11.10, Geforce 8600GT, Nvidia 280.13 drivers.

    It just won't even start, it's just a blank window. Disabling GPU emulation makes it work again.