是什么导致发生了内部构建错误。编译器中未捕获的异常?
What is causing An internal build error has occured. Uncaught Exception in Compiler?
我在我的项目中遇到这个错误,我不知道如何修复它,我以前从未见过它:
java.lang.NullPointerException at macromedia.asc.semantics.ConstantEvaluator.PreprocessDefinitionTypeInfo(ConstantEvaluator.java:3265) at flex2.compiler.as3.As3Compiler.analyze3(As3Compiler.java:701) 1131: Classes must not be nested.
这是由以下语法错误引起的:
public function addDecorator( decorator:IDecorator, subDrawLayer:Sprite ) : void {
if (subDrawLayer==null) {
subDrawLayer:Sprite = new Sprite();
}
drawLayer.addChild(subDrawLayer);
decorators.push(decorator);
subDrawLayers[decorator] = subDrawLayer;
}
具体就是这一行,subDrawLayer:Sprite = new Sprite();
subDrawLayer 变量类型不小心被定义了两次;一次在参数中,然后一次内联在函数中。应该是subDrawLayer = new Sprite();
我在我的项目中遇到这个错误,我不知道如何修复它,我以前从未见过它:
java.lang.NullPointerException at macromedia.asc.semantics.ConstantEvaluator.PreprocessDefinitionTypeInfo(ConstantEvaluator.java:3265) at flex2.compiler.as3.As3Compiler.analyze3(As3Compiler.java:701) 1131: Classes must not be nested.
这是由以下语法错误引起的:
public function addDecorator( decorator:IDecorator, subDrawLayer:Sprite ) : void {
if (subDrawLayer==null) {
subDrawLayer:Sprite = new Sprite();
}
drawLayer.addChild(subDrawLayer);
decorators.push(decorator);
subDrawLayers[decorator] = subDrawLayer;
}
具体就是这一行,subDrawLayer:Sprite = new Sprite();
subDrawLayer 变量类型不小心被定义了两次;一次在参数中,然后一次内联在函数中。应该是subDrawLayer = new Sprite();