【问题标题】:"unknown option: --output" after updating Android SDK from revision 12 to revision 13将 Android SDK 从修订版 12 更新到修订版 13 后出现“未知选项:--output”
【发布时间】:2011-10-02 17:15:46
【问题描述】:

我刚刚将我的 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

【问题讨论】:

    标签: android ant proguard


    【解决方案1】:

    我自己已经设法弄清了这个问题。 Android SDK 工具修订版 13 需要 Android SDK 平台工具修订版 7。

    有一些关于如何获取和安装 platform-tools 7 here. 的说明

    【讨论】:

      猜你喜欢
      • 2010-11-15
      • 2011-12-12
      • 1970-01-01
      • 2013-11-07
      • 2011-09-29
      • 1970-01-01
      • 2013-05-11
      • 2021-02-26
      • 1970-01-01
      相关资源
      最近更新 更多