2011-09-07 31 views
4

这让我疯狂。当建立一个项目,我得到以下错误在项目上运行构建器'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中,甚至从我的工作区中删除它并重新导入它。我仍然迷失。

+0

你使用Flash Builder ?您正在使用哪个版本的Flash Builder?您使用的是哪个版本的Flex SDK?你提到了导入一个工作区。您是否尝试过创建一个新的工作空间,以及新版本的Flash Builder,并重新创建您的项目?我在这篇文章中添加了Flash Builder标记。 – JeffryHouser

+0

@Flextras小心 - 它可能只是一个尚未更改的旧包名,但堆栈跟踪表示'flexbuilder'。 – Manius

+1

@Pasha这是Flex Builder 3(插件)还是其他?它看起来像你的IDE搞砸了,但我想这也可能是一个糟糕的工作空间。您最近没有做出任何导致此问题的更改? – Manius

回答

2
在我来说,我与模块工作,我创建了所有模块一个特殊的输出文件夹。我在日志中收到此:
!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. 
我可以通过编辑项目文件来解决它 - 这看上去导致这样的错误:
... 
<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> 
... 
我可以通过编辑项目文件来解决它 - 看起来像这样的错误:
... 
<linkedResources> 
    <link> 
     <name>bin-debug</name> 
     <type>2</type> 
     <locationURI>DOCUMENTS/modules</locationURI> 
    </link> 
</linkedResources> 
... 

希望这可以帮助别人解决这个恼人的错误。

0

在我的情况下,原因是项目所在的文件夹没有.actionScriptProperties文件。

如果你不能找到这个文件的任何地方这是我的样子

<?xml version="1.0" encoding="UTF-8"?> 
<actionScriptProperties mainApplicationPath="YOUR_MAIN_SCREEN.mxml" version="3"> 
<compiler additionalCompilerArguments="-locale en_US -use-network=false" copyDependentFiles="true" enableModuleDebug="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersion="9.0.0" htmlPlayerVersionCheck="true" outputFolderPath="bin" strict="true" useApolloConfig="false" verifyDigests="true" warn="true"> 
<compilerSourcePath/> 
<libraryPath defaultLinkType="1"> 
<libraryPathEntry kind="4" path=""> 
<modifiedEntries> 
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/framework.swc" sourcepath="${PROJECT_FRAMEWORKS}/source" useDefaultLinkType="true"/> 
</modifiedEntries> 
<excludedEntries> 
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation_agent.swc" useDefaultLinkType="false"/> 
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation.swc" useDefaultLinkType="false"/> 
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/qtp.swc" useDefaultLinkType="false"/> 
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation_dmv.swc" useDefaultLinkType="false"/> 
</excludedEntries> 
</libraryPathEntry> 
<libraryPathEntry kind="1" linkType="1" path="bin"/> 
<libraryPathEntry kind="1" linkType="1" path="${PROJECT_FRAMEWORKS}"/> 
<libraryPathEntry kind="1" linkType="1" path="bin/libs"/> 
<libraryPathEntry kind="1" linkType="1" path="libs"/> 
<libraryPathEntry kind="1" linkType="1" path="Components/ComponentsTesoreria"/> 
</libraryPath> 
<sourceAttachmentPath> 
<sourceAttachmentPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/datavisualization.swc" sourcepath="${PROJECT_FRAMEWORKS}/source" useDefaultLinkType="false"/> 
<sourceAttachmentPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" sourcepath="${PROJECT_FRAMEWORKS}/source" useDefaultLinkType="false"/> 
<sourceAttachmentPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/framework.swc" sourcepath="${PROJECT_FRAMEWORKS}/source" useDefaultLinkType="true"/> 
</sourceAttachmentPath> 
</compiler> 
<applications> 
<application path="YOUR_MAIN_SCREEN.mxml"/> 
<application path="ANOTHER_SCREEN.mxml"/> 
</applications> 
<modules/> 
<buildCSSFiles/> 
<?xml version="1.0" encoding="UTF-8"?> 
<actionScriptProperties mainApplicationPath="YOUR_MAIN_SCREEN.mxml" version="3"> 
<compiler additionalCompilerArguments="-locale en_US -use-network=false" copyDependentFiles="true" enableModuleDebug="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersion="9.0.0" htmlPlayerVersionCheck="true" outputFolderPath="bin" strict="true" useApolloConfig="false" verifyDigests="true" warn="true"> 
<compilerSourcePath/> 
<libraryPath defaultLinkType="1"> 
<libraryPathEntry kind="4" path=""> 
<modifiedEntries> 
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/framework.swc" sourcepath="${PROJECT_FRAMEWORKS}/source" useDefaultLinkType="true"/> 
</modifiedEntries> 
<excludedEntries> 
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation_agent.swc" useDefaultLinkType="false"/> 
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation.swc" useDefaultLinkType="false"/> 
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/qtp.swc" useDefaultLinkType="false"/> 
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation_dmv.swc" useDefaultLinkType="false"/> 
</excludedEntries> 
</libraryPathEntry> 
<libraryPathEntry kind="1" linkType="1" path="bin"/> 
<libraryPathEntry kind="1" linkType="1" path="${PROJECT_FRAMEWORKS}"/> 
<libraryPathEntry kind="1" linkType="1" path="bin/libs"/> 
<libraryPathEntry kind="1" linkType="1" path="libs"/> 
<libraryPathEntry kind="1" linkType="1" path="Components/ComponentsTesoreria"/> 
</libraryPath> 
<sourceAttachmentPath> 
<sourceAttachmentPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/datavisualization.swc" sourcepath="${PROJECT_FRAMEWORKS}/source" useDefaultLinkType="false"/> 
<sourceAttachmentPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" sourcepath="${PROJECT_FRAMEWORKS}/source" useDefaultLinkType="false"/> 
<sourceAttachmentPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/framework.swc" sourcepath="${PROJECT_FRAMEWORKS}/source" useDefaultLinkType="true"/> 
</sourceAttachmentPath> 
</compiler> 
<applications> 
<application path="YOUR_MAIN_SCREEN.mxml"/> 
<application path="ANOTHER_SCREEN.mxml"/> 
</applications> 
<modules/> 
<buildCSSFiles/> 
</actionScriptProperties> 

如果你有一个仓库链接到该项目这可以解释为什么这种情况正在发生 http://www.blackcj.com/blog/2009/02/22/error-loading-project-missing-project-files/

相关问题