Internal Build Error or Classes Must Not Be Nested (Flash Builder)
Posted by: Keith H in ActionScript 3, Adobe AIR, Flash, Flash Builder, tags: classes must not be nessted, error, internal build error, syntaxI blame myself for typing typos, but the cause of this typo is harder to spot.
The compiler throws the error saying either "Internal Build Error" or "Classes Must Not Be Nested".
Knowing "gotchas" is helpful so I'm posting this.
For most errors we take the compiler for granted and it will tell you where you wrote some misspelled keyword or syntax because someone called you on the phone while you was in the middle of writing script. You get back to your code and run the compiler and bam! You can't figure out the cause of the error. You're already up late and tired while you read each line looking for the cause.
With my situation the compiler couldn't tell me where exactly I failed in life. I knew what classes I was working on before the error occurred. In each of them I commented out each class member declaration till the error disappeared. This let me know which class was potentially the problem.
Then in the suspect class I proofread each line of code and saw my very stupid mistake.
Here's a minimized example of the bad syntax...
package net.keithhair
{
import flash.geom.Point;
public class SomeInnocentClass
{
private var _x:Number = 0;
private var _y = Number = 0; // Offending syntax.
public function SomeInnocentClass()
{
}
}
}
(Oh yea, if you're using Flash Builder, make sure you run "clean" after correcting the syntax)
I googled the error and read some comments here. The cause of the error is varied so It's a good thing when others post their causes too. It's easier to debug when you know "gotchas" to look out for.
http://rjowen.wordpress.com/2007/06/21/internal-build-error-or-classes-must-not-be-nested-error


Entries (RSS)