将Android SDK从版本12更新到版本13后,“未知选项: - output”

时间:2011-10-02 17:15:47

标签: android ant proguard

我刚刚将我的Android开发工具更新到版本13.这一切都很顺利,我可以像往常一样继续构建eclipse。

但是,一旦我尝试使用ant进行发布构建,我的构建将失败,并显示消息“未知选项: - output”。

进一步信息:我在64位窗口上运行32位Eclipse / Java。只有在从命令行运行构建并且在将sdk从版本12更新到13之前构建工作时才会出现此问题。

以下是“ant release”的相关输出

 [proguard] Printing classes to [C:\Work\bugsy_workspace\bugsy\bin\proguard\dump.txt]...

-dex:
     [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]
    [apply]   [--keep-classes] [--output=<file>] [--dump-to=<file>] [--dump-width=<n>]
    [apply]   [--dump-method=<name>[*]] [--verbose-dump] [--no-files] [--core-library]
    [apply]   [--num-threads=<n>] [<file>.class | <file>.{zip,jar,apk} | <directory>] ...
    [apply]     Convert a set of classfiles into a dex file, optionally embedded in a
    [apply]     jar/zip. Output name must end with one of: .dex .jar .zip .apk. Positions
    [apply]     options: none, important, lines.
    [apply]   dx --annotool --annotation=<class> [--element=<element types>]
    [apply]   [--print=<print types>]
    [apply]   dx --dump [--debug] [--strict] [--bytes] [--optimize]
    [apply]   [--basic-blocks | --rop-blocks | --ssa-blocks | --dot] [--ssa-step=<step>]
    [apply]   [--width=<n>] [<file>.class | <file>.txt] ...
    [apply]     Dump classfiles, or transformations thereof, in a human-oriented format.
    [apply]   dx --junit [-wait] <TestClass>
    [apply]     Run the indicated unit test.
    [apply]   dx -J<option> ... <arguments, in one of the above forms>
    [apply]     Pass VM-specific options to the virtual machine that runs dx.
    [apply]   dx --version
    [apply]     Print the version of this tool (1.6).
    [apply]   dx --help
    [apply]     Print this message.

BUILD FAILED
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

1 个答案:

答案 0 :(得分:2)

我自己也成功了解了这一点。 Android SDK工具修订版13需要Android SDK平台工具修订版7。

关于如何获得&amp;安装平台工具7 here.