刚刚使用基本的ant脚本将我的Flex应用程序移动到Ant上,我收到了这个愚蠢的错误:mxmlc不支持“file”属性。我查看了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>
答案 0 :(得分:1)
这是我的“典型”构建文件的一部分
<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>
希望这有帮助