2011-09-07 98 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/

相關問題