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