如何使用 ANT 生成 .air 文件?
这是我的 build.xml 中的一个示例。
<mxmlc
file="${SRC_DIR}/Main.mxml"
output="${DEPLOY_DIR}/@{market}.air"
locale="@{locale}"
debug="false"
optimize="true">
<arg value="+configname=air"/>
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
<include name="*.swc" />
</library-path>
</mxmlc>
运行此程序并生成 .air 文件时,不会产生任何错误,但双击 .air 文件时,我收到错误消息:
“无法安装应用程序,因为 AIR 文件已损坏。请尝试从应用程序作者处获取新的 AIR 文件。”
任何帮助将不胜感激。
This is a sample from my build.xml
<mxmlc
file="${SRC_DIR}/Main.mxml"
output="${DEPLOY_DIR}/@{market}.air"
locale="@{locale}"
debug="false"
optimize="true">
<arg value="+configname=air"/>
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
<include name="*.swc" />
</library-path>
</mxmlc>
There are no errors produced when this runs and a .air file is produced but when the .air file is double clicked I get the error message:
"The application could not be installed because the AIR file is damaged. Try obtaining a new AIR file from the application author."
Any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如何执行此操作的示例如下: http: //blog.devsandbox.co.uk/wp-content/uploads/2009/09/example_air_build.xml
An example of how to do this is here: http://blog.devsandbox.co.uk/wp-content/uploads/2009/09/example_air_build.xml
您需要使用 AIR 编译器 (amxmlc) : http ://livedocs.adobe.com/flex/3/html/help.html?content=CommandLineTools_2.html
不确定他们是否也有一个 ANT 任务,但值得一试。
You need to use the AIR compiler (amxmlc) : http://livedocs.adobe.com/flex/3/html/help.html?content=CommandLineTools_2.html
Not sure if they also have an ANT task for this, but it's worth a try.