Flex-Ant:mxmlc 不支持“文件”属性

发布于 2024-08-14 12:40:04 字数 1520 浏览 6 评论 0原文

刚刚使用基本的 ant 脚本将我的 Flex 应用程序移至 Ant 上,但我收到了这个愚蠢的错误:mxmlc 不支持“文件”属性。我查看了 docos,看来我的代码是正确的,那么进展如何。

<!-- load previously defined configuration properties file -->
<property file="build.properties" />

<!-- points to our flexTasks.jar we copied to the libs folder to distribute with the project -->
<taskdef resource="flexTasks.tasks" classpath="${basedir}/libs/flexTasks.jar"/> 

<!-- delete and recreate the DEPLOY dir -->
<target name="init">
    <delete dir="${DEPLOY_DIR}" />
    <mkdir dir="${DEPLOY_DIR}" />       
</target>

<!-- Build and output the Main.swf-->
<target name="compile flex project" depends="init">
    <mxmlc file="${SRC_DIR}/DNASupport.mxml"
        actionscript-file-encoding="UTF-8"
        keep-generated-actionscript="false"
        incremental="true"
        optimize="true"
        output="${DEPLOY_DIR}/Main.swf">
        <license product="flexbuilder3" serial-number="137740016118223699076222" />
        <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
        <source-path path-element="${app_root_dir}/src" />
        <source-path path-element="${FLEX_HOME}/frameworks" />
        <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
        <source-path path-element="${FLEX_HOME}/frameworks"/>
        <compiler.debug>false</compiler.debug>          
    </mxmlc>
</target>

Just moved my Flex app onto Ant with a basic ant script and I am getting this stupid error: mxmlc doesn't support the "file" attribute. I looked through docos and it seems that my code is right, so hows it going.

<!-- load previously defined configuration properties file -->
<property file="build.properties" />

<!-- points to our flexTasks.jar we copied to the libs folder to distribute with the project -->
<taskdef resource="flexTasks.tasks" classpath="${basedir}/libs/flexTasks.jar"/> 

<!-- delete and recreate the DEPLOY dir -->
<target name="init">
    <delete dir="${DEPLOY_DIR}" />
    <mkdir dir="${DEPLOY_DIR}" />       
</target>

<!-- Build and output the Main.swf-->
<target name="compile flex project" depends="init">
    <mxmlc file="${SRC_DIR}/DNASupport.mxml"
        actionscript-file-encoding="UTF-8"
        keep-generated-actionscript="false"
        incremental="true"
        optimize="true"
        output="${DEPLOY_DIR}/Main.swf">
        <license product="flexbuilder3" serial-number="137740016118223699076222" />
        <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
        <source-path path-element="${app_root_dir}/src" />
        <source-path path-element="${FLEX_HOME}/frameworks" />
        <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
        <source-path path-element="${FLEX_HOME}/frameworks"/>
        <compiler.debug>false</compiler.debug>          
    </mxmlc>
</target>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

温柔女人霸气范 2024-08-21 12:40:04

你在使用flex ant任务吗?

这是我的“典型”构建文件的一部分

<taskdef resource="flexTasks.tasks"  />
...
<target name="compile">
  <mxmlc file="Main.mxml" debug="true" output="main.swf">
    <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
    <source-path path-element="${FLEX_HOME}/frameworks" />
    <source-path path-element="${src}" />
  </mxmlc>
</target>

希望这有帮助

are you using the flex ant tasks?

This is a part of my "typical" build file

<taskdef resource="flexTasks.tasks"  />
...
<target name="compile">
  <mxmlc file="Main.mxml" debug="true" output="main.swf">
    <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
    <source-path path-element="${FLEX_HOME}/frameworks" />
    <source-path path-element="${src}" />
  </mxmlc>
</target>

Hope this helps

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文