Flash Builder(Flex)Air Project mx。* libraries swc类mx.logging.targets :: LineFormattedTarget无法找到

时间:2012-09-27 21:42:24

标签: actionscript-3 flash flash-builder swc

我项目的队友添加了一个swc,里面有一些mx日志类,现在我的项目无法编译。错误:

Class mx.logging.targets::LineFormattedTarget could not be found.

我正在使用最新的Flash Builder 4.6,全新安装。当我去项目>时注意到属性>然后,Actionscript Compiler选择Libraries,没有像以前那样选择MX的选项。有人知道如何解决这个问题。我认为swc背后的想法是它们是独立的,不需要我添加额外的进口。感谢。

1 个答案:

答案 0 :(得分:1)

非常奇怪......所以在上面讨论了一下之后我把一个示例项目组合在一起,这对我正在使用的4.6.0 SDK编译得很好,当我扩展时,我可以在framework.swc中看到LineFormattedTarget类它在左侧导航器的库中:

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
                       xmlns:s="library://ns.adobe.com/flex/spark" 
                       xmlns:mx="library://ns.adobe.com/flex/mx"
                       creationComplete="windowedapplication1_creationCompleteHandler(event)">
    <fx:Script>
        <![CDATA[
            import mx.core.mx_internal;
            import mx.events.FlexEvent;
            import mx.logging.targets.LineFormattedTarget;

            protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void
            {
                var test:LineFormattedTarget = new LineFormattedTarget();
            }

        ]]>
    </fx:Script>
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>

</s:WindowedApplication>

我会检查以确保它显示4.6引用库中的framework.swc,如果swc不在那里尝试删除并重新添加框架到库路径,如果失败并且结果相同我我会考虑将SDK拉下来。