apache-flex - Ant 任务 compc for air 错误

标签 apache-flex actionscript-3 ant air

我正在尝试从我编写的源代码编译 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>

最佳答案

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

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

我也从来没有听说过,谷歌 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 才能正确运行。

关于apache-flex - Ant 任务 compc for air 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6140271/

相关文章:

apache-flex - 从Flex 3迁移到Flex 4错误

apache-flex - 如何自动构建Flex组件库?

java - 如何为 NetBeans Java Web App 项目向 Ant 添加 jar 文件以便构建它?

performance - 隐藏动画片段,渲染性能

c++ - 使用 Adob​​e Alchemy 的 libFLAC 移植问题

java - Ant - 设置 ClassPath 对于批量测试不起作用

php - 清理 HTML 格式的内容以便在 Flash 中显示?

actionscript-3 - 闪光灯:crossdomain.xml 被忽略

apache-flex - Flex数据网格: Change value based on another value?

actionscript-3 - 在 ActionScript3 中嵌入位图