Sunday, October 2, 2011

Android Sdk Revision 13: Unknown option: --output

I'm just preparing a new release of Bugsy and I see that there is a new version of the android SDK. I really wish I had resisted the urge to upgrade!

When I try to do my release build with "ant release" I now get a build failure when proguard tries to write Its dump file. "Unknown option: --output". A Quick search on google turns up .... nothing ...   Again why did I upgrade???

Here's the output of the build.

 [proguard] Printing classes to [C:\Work\bugsy_workspace\bugsy\bin\proguard\dump.txt]...
     [echo] Converting compiled files and external libraries into C:\Work\bugsy_workspace\bugsy\bin\classes.dex...
    [apply] unknown option: --output
    [apply] usage:
    [apply]   dx --dex [--debug] [--verbose] [--positions=<style>] [--no-locals]
    [apply]   [--no-optimize] [--statistics] [--[no-]optimize-list=<file>] [--no-strict]
  .... snip .....

C:\PROGRA~2\Android\android-sdk\tools\ant\main_rules.xml:487: The following error occurred while executing this line:
C:\PROGRA~2\Android\android-sdk\tools\ant\main_rules.xml:203: apply returned: 1

Total time: 12 seconds

After an evening of hacking and hair-pulling I've finally gotten to the bottom of this. SDK Revision 13 Requires Android SDK Platform-tools, revision 7.  For me the key news is that "Android SDK Platform-tools, revision 7" is not an older version of "Android SDK Tools, revision 13". Surely it would be easy to name these more clearly?

To get the latest platform tools look in the Android SDK & AVD Manager. In eclipse this on the Window menu. Click Available Packages, Expand Android repository, Check "Android SDK Platform-tools, revision 7" and hit Install.

No comments:

Post a Comment