在项目上运行构建器“Flex”的错误

这真让我抓狂.在构建项目时,我收到以下错误

Errors occurred during the build.
    Errors running builder 'Flex' on project 'my-services'.
    java.lang.NullPointerException

这是Eclipse中错误日志的最后一个错误

!ENTRY org.eclipse.core.resources 4 75 2011-09-07 16:07:04.391
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 com.adobe.flexbuilder.project 4 75 2011-09-07 16:07:04.391
!MESSAGE Errors running builder 'Flex' on project 'my-services'.
!STACK 0
java.lang.NullPointerException
    at com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.calcBuildTotalWork(FlexProjectBuilder.java:148)
    at com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.build(FlexProjectBuilder.java:160)
    at com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilder.build(FlexIncrementalBuilder.java:157)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:311)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:343)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:242)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

我已经尝试清理项目,刷新项目,重新启动eclipse,甚至从我的工作区中删除它并重新导入它.我还是输了.

最佳答案 在我的情况下,我正在使用模块,我为所有模块创建了一个特殊的输出文件夹.我在日志中收到了这个:

!ENTRY org.eclipse.core.resources 4 75 2012-03-04 10:27:12.328
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 com.adobe.flexbuilder.project 4 75 2012-03-04 10:27:12.328
!MESSAGE Errors running builder 'Flex' on project 'myProject'.
!STACK 0
java.lang.RuntimeException: Object reference not set to an instance of an object.

我能够通过编辑.project文件解决它 – 看起来导致如下错误:

...
<linkedResources>
    <link>
        <name>[source path] modules</name>
        <type>2</type>
        <locationURI>DOCUMENTS/modules</locationURI>
    </link>
    <link>
        <name>bin-debug</name>
        <type>2</type>
        <locationURI>DOCUMENTS/modules</locationURI>
    </link>
</linkedResources>
...

我能够通过编辑.project文件解决它 – 看起来导致如下错误:

...
<linkedResources>
    <link>
        <name>bin-debug</name>
        <type>2</type>
        <locationURI>DOCUMENTS/modules</locationURI>
    </link>
</linkedResources>
...

希望这有助于其他人解决这个恼人的错误.

点赞