Another cause of the Flex compiler's infamous error: "An internal build error has occurred..."
Background
As I have been developing Flex apps for some time now, I have come across a few different causes of the Flex compiler error: "An internal build error has occurred. Please check the Error log". Thankfully, community blog postings and the flexcoders newsgroup have helped me get through them until yesterday.
The common thread I've seen previously for this error has been syntactic errors such as missing semicolons or interface function definitions missing parentheses. Considering this and the generic error description, I would assume this is just a catch-all error message the compiler throws when it doesn't know the specific cause of the compile failure.
The Problem
My suspicion was further reinforced yesterday when I got shortcut-key-happy and tried to debug my current project while working in a file that was linked into the project from an external library. Flex (Eclipse Plugin) decided to consider my ActionScript class (.as) a valid Flex application and added an entry to the .actionScriptProperties file. This resulted in the indescript internal build error.
The Solution
To resolve the situation I had to delete the entry and restart Eclipse (it appears the .project, .flexProperties, and .actionScriptProperties files may be held in memory upon initial load of Eclipse and thus sometimes require a restart when changed manually). It took some time to figure this out since I was focused on checking my recent code changes for syntax errors (of which I found none, of course!).
An example may make this scenario a bit clearer:
The example project below has an ActionScript class, ClassFromExternalLibrary.as, that is included in the project through Project Properties -> Flex Build Path -> Source Path (Add Folder). This class is then referenced in my project by SomeProject.mxml.

Now, using the keyboard shortcut for Debug Flex Application while editing the externally linked *.as class will typically work fine; however, I believe the problem I ran into resulted from having multiple projects open that all referenced the same linked file, which causes the Flex IDE to *somehow* devine which project it thinks I am in for the particular file. If you explicitly open the file from the Navigator, it will scope to that project appropriately; however, it is easily confused when using the Ctrl/Cmd-click feature of Eclipse which takes you directly from the MXML application in your project to the linked ActionScript class in the external library.
Anyhow, the following picture illustrates what the project looks like after Flex has mistaken the ActionScript class, ClassFromExternalLibrary.as, as a valid Flex application.

Note how, in the Navigator, the icon for ClassFromExternalLibrary.as now has a green arrow identifying it as a Flex application. This is a result of the .actionScriptProperties file including an <application .../> entry for the class (highlighted in the editor). Simply remove the entry and restart Eclipse/Flex Builder and you should be set.
Hope this helps you out!
Cheers,
Ryan
As I have been developing Flex apps for some time now, I have come across a few different causes of the Flex compiler error: "An internal build error has occurred. Please check the Error log". Thankfully, community blog postings and the flexcoders newsgroup have helped me get through them until yesterday.
The common thread I've seen previously for this error has been syntactic errors such as missing semicolons or interface function definitions missing parentheses. Considering this and the generic error description, I would assume this is just a catch-all error message the compiler throws when it doesn't know the specific cause of the compile failure.
The Problem
My suspicion was further reinforced yesterday when I got shortcut-key-happy and tried to debug my current project while working in a file that was linked into the project from an external library. Flex (Eclipse Plugin) decided to consider my ActionScript class (.as) a valid Flex application and added an entry to the .actionScriptProperties file. This resulted in the indescript internal build error.
The Solution
To resolve the situation I had to delete the entry and restart Eclipse (it appears the .project, .flexProperties, and .actionScriptProperties files may be held in memory upon initial load of Eclipse and thus sometimes require a restart when changed manually). It took some time to figure this out since I was focused on checking my recent code changes for syntax errors (of which I found none, of course!).
An example may make this scenario a bit clearer:
The example project below has an ActionScript class, ClassFromExternalLibrary.as, that is included in the project through Project Properties -> Flex Build Path -> Source Path (Add Folder). This class is then referenced in my project by SomeProject.mxml.

Now, using the keyboard shortcut for Debug Flex Application while editing the externally linked *.as class will typically work fine; however, I believe the problem I ran into resulted from having multiple projects open that all referenced the same linked file, which causes the Flex IDE to *somehow* devine which project it thinks I am in for the particular file. If you explicitly open the file from the Navigator, it will scope to that project appropriately; however, it is easily confused when using the Ctrl/Cmd-click feature of Eclipse which takes you directly from the MXML application in your project to the linked ActionScript class in the external library.
Anyhow, the following picture illustrates what the project looks like after Flex has mistaken the ActionScript class, ClassFromExternalLibrary.as, as a valid Flex application.

Note how, in the Navigator, the icon for ClassFromExternalLibrary.as now has a green arrow identifying it as a Flex application. This is a result of the .actionScriptProperties file including an <application .../> entry for the class (highlighted in the editor). Simply remove the entry and restart Eclipse/Flex Builder and you should be set.
Hope this helps you out!
Cheers,
Ryan

Links to this post:
Create a Link
<< Home