【问题标题】:Ant tasks compc for air errorsAnt 任务 compc 处理空气错误
【发布时间】:2011-05-26 14:31:02
【问题描述】:

我正在尝试从我编写的源代码编译 SWC,但由于某种原因我收到此错误:

[compc] Error: 'flash.events:StageOrientationEvent' is undefined.
[compc]
[compc] Error: 'flash.data:EncryptedLocalStore' is undefined.
[compc]
[compc] Error: 'flash.desktop:NativeDragActions' is undefined.
[compc]
[compc] Error: 'flash.desktop:NativeDragOptions' is undefined.
[compc]
[compc] Error: 'flash.events:NativeDragEvent' is undefined.

不知道怎么解决。

有什么想法吗?

更新

tcompc 代码:

<compc debug="true" target-player="10.2" optimize="true" strict="true" as3="true" compute-digest="false" output="${outputFull}">
    <include-sources dir="./" includes="**/*.as" />
<compiler.library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
        <include name="*"/>
</compiler.library-path>
</compc>

【问题讨论】:

  • 请将文本中的错误添加到您的问题中,而不是发布指向外部资源的链接。干杯
  • 哪个 AIR 和哪个 Flex 版本?似乎您正在尝试编译一个移动项目,还有与元数据相关的警告。
  • 我使用的是 flex_sdk_4.5.0.19786,Target 是 10.2,swc 是桌面应用程序的一部分。一切都很好,直到我添加了EncryptedLocalStore 功能
  • 遇到同样的问题。找到解决方案了吗?
  • 试过添加空中库、移动库,都没有结果。

标签: apache-flex actionscript-3 ant air


【解决方案1】:

好的,经过一番 google-fu,我发现 compc 不适用于空气组件库!

得到这个,你需要使用acompc!是的!看看这个:http://livedocs.adobe.com/flex/3/html/help.html?content=CommandLineTools_3.html

我也从未听说过,而且 google acompc 并没有真正给你太多。

我找不到任何关于 ANT 任务的文档,但我发现这篇博客文章描述了如何使用“exec-task”执行此操作,build.xml 在这篇博客文章的评论中:http://andkrup.wordpress.com/2010/06/08/flex-3-5-air-swc-ant-tasks/

更新 我正在重新阅读该博客文章,并在底部注意到此代码发布在最后一条评论中:

<compc output="${dir.build}/${ant.project.name}.swc" target-player="10.0.0">
    <load-config filename="${FLEX_HOME}/frameworks/air-config.xml" />
</compc>

显然 compc 只需要一个不同的 config.xml 才能正确运行。

【讨论】:

  • 您需要添加到 &lt;mxmlc&gt; 的同一行以编译 swf for air。
  • 谢谢!我挠了几个小时才发现这个:)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2023-03-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-04-11
  • 1970-01-01
相关资源
最近更新 更多