我正在运行ant来编译Flex应用程序,并且在Windows命令行上运行时,构建会一直失败。我团队中的其他人可以在mac和linux下成功运行相同的构建。
这是命令提示符中显示的错误:
compile-main:
[mxmlc] Loading configuration file C:\Program Files (x86)\Adobe\Adobe Flash Builder Burrito\sdks\3.5.0\frameworks\flex-config.xml
[mxmlc] Error: null
[mxmlc]
[mxmlc] java.lang.NullPointerException
[mxmlc] at flex2.compiler.CompilerSwcContext.createSource(CompilerSwcContext.java:353)
[mxmlc] at flex2.compiler.CompilerSwcContext.getSource(CompilerSwcContext.java:337)
[mxmlc] at flex2.compiler.API.findDefinition(API.java:2685)
[mxmlc] at flex2.compiler.API.resolveMultiName(API.java:3350)
[mxmlc] at flex2.compiler.API.resolveExpression(API.java:3193)
[mxmlc] at flex2.compiler.API.batch2(API.java:399)
[mxmlc] at flex2.compiler.API.batch(API.java:1117)
[mxmlc] at flex2.compiler.API.compile(API.java:1290)
[mxmlc] at flex2.compiler.API.compile(API.java:1210)
[mxmlc] at flex2.tools.Compiler.mxmlc(Compiler.java:275)
[mxmlc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[mxmlc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[mxmlc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[mxmlc] at java.lang.reflect.Method.invoke(Method.java:597)
[mxmlc] at flex.ant.FlexTask.executeInProcess(FlexTask.java:283)
[mxmlc] at flex.ant.FlexTask.execute(FlexTask.java:225)
[mxmlc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[mxmlc] at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
[mxmlc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[mxmlc] at java.lang.reflect.Method.invoke(Method.java:597)
[mxmlc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[mxmlc] at org.apache.tools.ant.Task.perform(Task.java:348)
[mxmlc] at org.apache.tools.ant.Target.execute(Target.java:390)
[mxmlc] at org.apache.tools.ant.Target.performTasks(Target.java:411)
[mxmlc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[mxmlc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[mxmlc] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[mxmlc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
[mxmlc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[mxmlc] at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
[mxmlc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[mxmlc] at java.lang.reflect.Method.invoke(Method.java:597)
[mxmlc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[mxmlc] at org.apache.tools.ant.Task.perform(Task.java:348)
[mxmlc] at org.apache.tools.ant.Target.execute(Target.java:390)
[mxmlc] at org.apache.tools.ant.Target.performTasks(Target.java:411)
[mxmlc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[mxmlc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[mxmlc] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[mxmlc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
[mxmlc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[mxmlc] at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
[mxmlc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[mxmlc] at java.lang.reflect.Method.invoke(Method.java:597)
[mxmlc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[mxmlc] at org.apache.tools.ant.Task.perform(Task.java:348)
[mxmlc] at org.apache.tools.ant.Target.execute(Target.java:390)
[mxmlc] at org.apache.tools.ant.Target.performTasks(Target.java:411)
[mxmlc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[mxmlc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[mxmlc] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[mxmlc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
[mxmlc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[mxmlc] at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
[mxmlc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[mxmlc] at java.lang.reflect.Method.invoke(Method.java:597)
[mxmlc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[mxmlc] at org.apache.tools.ant.Task.perform(Task.java:348)
[mxmlc] at org.apache.tools.ant.Target.execute(Target.java:390)
[mxmlc] at org.apache.tools.ant.Target.performTasks(Target.java:411)
[mxmlc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[mxmlc] at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[mxmlc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[mxmlc] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[mxmlc] at org.apache.tools.ant.Main.runBuild(Main.java:809)
[mxmlc] at org.apache.tools.ant.Main.startAnt(Main.java:217)
[mxmlc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
[mxmlc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
BUILD FAILED
D:\workspaces\Adobe Flash Builder Burrito Preview\FlexProjects\build.xml:10: The following error occurred while executing this line:
D:\workspaces\Adobe Flash Builder Burrito Preview\FlexProjects\AdToolSSP\build.xml:33: The following error occurred while executing this line:
D:\workspaces\Adobe Flash Builder Burrito Preview\FlexProjects\AdToolSSP\build\build.xml:18: The following error occurred while executing this line:
D:\workspaces\Adobe Flash Builder Burrito Preview\FlexProjects\AdToolSSP\build\compileproject.xml:39: mxmlc task failed
Total time: 21 seconds
这是compileproject.xml构建文件中的特定目标:
<target name="compile-main" description="Compila la aplicación principal">
<mxmlc allow-source-path-overlap="${compiler.allow_overlap}"
debug="${compiler.debug}"
file="${app.main.mxml}"
fork="${compiler.fork}"
keep-generated-actionscript="${compiler.keep_gen_as}"
link-report="${flex.output.dir}/report.xml"
locale="${compiler.locale}"
maxmemory="256m"
optimize="${compiler.optimize}"
output="${app.main.swf}"
services="${flex.services.dir}/services-config.xml"
>
<!-- Get default compiler options -->
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
<!-- List of path elements that form the roots of ActionScript class hierarchies -->
<source-path path-element="${FLEX_HOME}/frameworks" />
<!-- Path to the locales -->
<source-path path-element="${flex.resources.dir}/locale/{locale}" />
<!-- List of SWC files or directories that contain SWC files -->
<compiler.library-path dir="${flex.libs.dir}" append="true">
<include name="**/as3-signals-v0.6.swc" />
<include name="**/datavisualization_rb.swc" />
<include name="**/datavisualization.swc" />
<include name="**/GenAocCairngorm.swc" />
<include name="**/GenAocLib.swc" />
</compiler.library-path>
<compiler.library-path dir="${flex.src.dir}/assets" append="true">
<include name="**/*.swc" />
</compiler.library-path>
</mxmlc>
</target>
所有标记都设置在相应的build.properties和过滤器.properties文件中(并且,正如我之前所说,它在mac和linux下完美编译)。
Windows版本为7 Ultimate,FLEX_HOME被设置为Flex SDK 3.5(Adobe Flash Builder Burrito附带的3.5.0.12683版本)的环境变量。 $ {compiler.fork}设置为false,以避免SDK和源文件位于不同逻辑驱动器中的问题。
任何线索(根本)都将非常感谢!