Actionscript 3 AS3错误:通过静态类型类的引用访问可能未定义的属性STANDARD_OUTPUT_数据
我有一个Flex AIR项目,它在Flex Builder 4.6中编译和运行。我正在尝试创建一个Ant脚本来构建这个项目。在这些行中,我得到了以下错误:Actionscript 3 AS3错误:通过静态类型类的引用访问可能未定义的属性STANDARD_OUTPUT_数据,actionscript-3,apache-flex,ant,Actionscript 3,Apache Flex,Ant,我有一个Flex AIR项目,它在Flex Builder 4.6中编译和运行。我正在尝试创建一个Ant脚本来构建这个项目。在这些行中,我得到了以下错误: _process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onOutputData); _process.addEventListener(ProgressEvent.STANDARD_INPUT_PROGRESS, inputProgressL
_process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onOutputData);
_process.addEventListener(ProgressEvent.STANDARD_INPUT_PROGRESS, inputProgressListener);
_process.addEventListener(NativeProcessExitEvent.EXIT, onNativeProcessExit);
我得到了这个错误:
[mxmlc] MyClass.as(190): col: 44 Error: Access of possibly undefined property STANDARD_OUTPUT_DATA through a reference with static type Class.
[mxmlc] _process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onOutputData);
[mxmlc] ^
[mxmlc] MyClass.as(191): col: 44 Error: Access of possibly undefined property STANDARD_INPUT_PROGRESS through a reference with static type Class.
[mxmlc] _process.addEventListener(ProgressEvent.STANDARD_INPUT_PROGRESS, inputProgressListener);
据我所知,这些都是在frameworks/libs/air/airglobal.swc中定义的。我想我在下面的compiler.external-library-path元素中包含了这一点
my build.xml ant脚本的编译目标如下所示:
<target name="compile" depends="init">
<mxmlc file="${MAIN_SOURCE_FILE}" output="${DEPLOY_DIR}/${APP_NAME}.swf"
services="${APP_ROOT}/services/flex/services-config.xml">
<swf-version>13</swf-version>
<locale>en_US</locale>
<static-link-runtime-shared-libraries>true</static-link-runtime-shared-libraries>
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
<source-path path-element="${FLEX_HOME}/frameworks"/>
<source-path path-element="${APP_ROOT}/../MyLib/src"/>
<source-path path-element="${APP_ROOT}/src"/>
<compiler.external-library-path dir="${FLEX_HOME}/frameworks" append="true">
<include name="libs/air" />
</compiler.external-library-path>
<compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
<include name="libs" />
<include name="../bundles/{locale}" />
</compiler.library-path>
<compiler.library-path dir="${APP_ROOT}" append="true">
<include name="libs" />
<include name="libs/player" />
</compiler.library-path>
<define name="CONFIG::debugging" value="false"/>
<compiler.debug>false</compiler.debug>
</mxmlc>
13
恩努斯
真的
假的
我认为您希望将
更改为以下内容之一:
<load-config filename="${FLEX_HOME}/frameworks/air-config.xml"/>
或
谢谢。将其更改为air-config.xml修复了它!
<load-config filename="${FLEX_HOME}/frameworks/airmobile-config.xml"/>