The Android Developers blog just announced an update for the Android SDK Tools and ADB. This new release, version 17, brings many improvements to the build process. Here are some of my favourite new features:
- Added check for Android API calls that require a version of Android higher than the minimum supported version. This will save you from having to test your app on Android 1.6 for example, only to have it fail due to an API call that was introduced in Android 2.1
- 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 such as outputting debug logs.
- 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. - Updated the resource chooser to show 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.
There are plenty more changes to be found in the SDK Release Notes and ADT Release Notes. The Android Emulator can now run x86 system images at native speed, thanks to contributions from Intel. Lint has also received a major upgrade, with 40 new rules checking for performance and code issues.
Version 17 is a must-download release, as it fixes a number of problems with the build framework, including the dreaded “Conversion to Dalvik format failed with error 1″ message when using external JAR files.
Many developers will also be pleased with the new Network Usage feature in DDMS. This provides a very powerful monitoring framework which allows you to analyse your app’s network usage in real time.
So what are you waiting for? Head over to the Android Developers website and download the latest release now! 🙂 Feel free to share your thoughts about the new SDK in the comments, or on the forum thread. Has it improved your coding efficiency?