我有一个 ant 脚本来编译和生成一个 AIR 文件,它运行良好。现在,我也在尝试将 asDocs 放入 ant 脚本中,以便在生成新 AIR 文件时自动生成文档。
虽然创建我的 swf 文件的 mxmlc 任务运行顺利,但我在 ANT 中的 asdoc 任务正在抛出错误。我不断收到以下错误:
compileASDoc: [asdoc] 加载配置文件 D:\4.1\4.1\frameworks\air-config.xml
[asdoc] ALPHA.as(3): col: 35 错误:
未找到基类 Panel 的定义。
[asdoc]
[asdoc] 公共类 ExtendPanel 扩展 Panel
[asdoc] ^
[asdoc]
[asdoc] XYZABC.mxml(-1):错误:重复的函数定义。
[asdoc]
[asdoc] < ?xml version="1.0" encoding="utf-8"?>
[asdoc]
[asdoc] XYZABC.mxml(-1):错误:与命名空间内部的定义 linkbutton1 存在冲突。
[asdoc]
[asdoc] < ?xml version="1.0" encoding="utf-8"?>
[asdoc]
[asdoc] GHIJKL.mxml(-1):错误:与内部命名空间中的定义 linkbutton1 存在冲突。
[asdoc]
[asdoc] < ?xml version="1.0" encoding="utf-8"?>
[asdoc]
我不明白为什么会出现这些错误。我的 ant 脚本与下面的非常相似:
<!-- Run the ASDoc executable and generate the ASDocs to the new output folder -->
<target name="compileASDoc" depends="clean, init">
<condition property="asdoc.jvm.args" value="-Xmx384m">
<os family="windows"/>
</condition>
<condition property="asdoc.jvm.args" value="-Xmx512m">
<os family="mac"/>
</condition>
<condition property="asdoc.jvm.args" value="-Xmx512m">
<os family="unix"/>
</condition>
<asdoc output="${Asdoc.dir}" lenient="true" failonerror="true" warnings="false"
strict="false" fork="true"
left-frameset-width="300"
main-title='${Main.title}'
footer="${Footer.text}"
window-title="Custom asdoc documentation" >
<doc-sources path-element="${SRC_DIR}" />
<doc-sources path-element="${IMAGES_DIR}" />
<doc-sources path-element="${SOME_LOCALE}/en_US" />
<doc-sources path-element="${SOME_LOCALE}/ar_AE" />
<load-config filename='${FLEX_HOME}/frameworks/air-config.xml'/>
<!-- top level class to include in asdoc -->
<doc-classes class="AIRFrameworkClasses"/>
<doc-classes class="AIRSparkClasses"/>
<doc-classes class="FlexClasses"/>
<doc-classes class="SparkClasses"/>
<doc-classes class="FrameworkClasses"/>
<!-- <doc-classes class="HaloClasses"/> -->
<doc-classes class="OSMFClasses"/>
<doc-classes class="SparkSkinsClasses"/>
<doc-classes class="RPCClasses"/>
<doc-classes class="flashx.textLayout.CoreClasses"/>
<doc-classes class="flashx.textLayout.EditClasses"/>
<doc-classes class="flashx.textLayout.ConversionClasses"/>
<!-- source path for asdoc -->
<compiler.source-path path-element="${flexlib}/projects/airframework/src"/>
<compiler.source-path path-element="${flexlib}/projects/airspark/src"/>
<compiler.source-path path-element="${flexlib}/projects/flex/src"/>
<compiler.source-path path-element="${flexlib}/projects/spark/src"/>
<compiler.source-path path-element="${flexlib}/projects/framework/src"/>
<compiler.source-path path-element="${flexlib}/projects/sparkskins/src"/>
<compiler.source-path path-element="${flexlib}/projects/osmf/src"/>
<compiler.source-path path-element="${flexlib}/projects/rpc/src"/>
<compiler.source-path path-element="${flexlib}/projects/textLayout/src"/>
<!-- namespaces to include in asdoc -->
<doc-namespaces uri="http://www.adobe.com/2006/airmxml"/>
<doc-namespaces uri="http://www.adobe.com/2006/airspark"/>
<doc-namespaces uri="library://ns.adobe.com/flex/spark"/>
<doc-namespaces uri="http://www.adobe.com/2006/mxml"/>
<doc-namespaces uri="http://www.adobe.com/2006/rpcmxml"/>
<doc-namespaces uri="library://ns.adobe.com/flashx/textLayout"/>
<doc-namespaces uri="http://ns.adobe.com/mxml/2009"/>
<namespace uri="library://ns.adobe.com/flashx/textLayout" manifest="${flexlib}/projects/textLayout/manifest.xml"/>
<!-- namespace declaration for asdoc -->
<namespace uri="http://www.adobe.com/2006/airmxml" manifest="${flexlib}/projects/airframework/manifest.xml"/>
<namespace uri="http://www.adobe.com/2006/airspark" manifest="${flexlib}/projects/airspark/manifest.xml"/>
<namespace uri="http://www.adobe.com/2006/rpcmxml" manifest="${flexlib}/projects/rpc/manifest.xml"/>
<namespace uri="http://www.adobe.com/2006/mxml" manifest="${flexlib}/mxml-manifest.xml"/>
<namespace uri="library://ns.adobe.com/flex/spark" manifest="${flexlib}/projects/spark/manifest.xml"/>
<namespace uri="library://ns.adobe.com/flex/mx" manifest="${flexlib}/mxml-manifest.xml"/>
<namespace uri="http://ns.adobe.com/mxml/2009" manifest="${flexlib}/mxml-2009-manifest.xml"/>
<library-path/>
<external-library-path dir="${flexlib}/libs">
<include name="*.swc" />
</external-library-path>
<external-library-path dir="${flexlib}/libs/air">
<include name="*.swc" />
</external-library-path>
<external-library-path dir="${LIBS_DIR}">
<include name="*.swc" />
</external-library-path>
<external-library-path dir="${LOCALE_DIR}">
<include name="*.swc" />
</external-library-path>
<external-library-path dir="${AR_LOCALE_DIR}">
<include name="*.swc" />
</external-library-path>
<jvmarg line="${asdoc.jvm.args}"/>
<define name="CONFIG::debug" value="false"/>
<define name="CONFIG::release" value="true"/>
<define name="CONFIG::FLASH_10_1" value="false"/>
<define name="CONFIG::LOGGING" value="false"/>
</asdoc>
<echo>Docs creation complete</echo>
</target>
在查看 FLEX_HOME 文件夹中 asdoc 文件夹中的 build.xml 后,我编写了这个脚本。
任何关于我为什么会收到错误以及如何解决它们的提示将不胜感激!
问候,
拉维。