flash - 无法解析 to a component imple

我的flex源文件夹“src”具有以下文件:

src/
  chatters.as
  chatters.mxml
  main.as
  main.mxml

这是“chatters.mxml”的来源:
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"  
         xmlns:s="library://ns.adobe.com/flex/spark" 
         xmlns:mx="library://ns.adobe.com/flex/mx" 
         width="250" height="200"
         contentBackgroundColor="#abcdef">
</s:Group>

这是'main.mxml'的来源:
<?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"
                       xmlns:local="*"
                       applicationComplete="run();">    
    <local:chatters>        
    </local:chatters>
</s:WindowedApplication>

所有文件chatters.as,chatters.mxml,main.as,main.mxml都在默认软件包下,并且默认软件包的XML namespace 在main.mxml中设置为xmlns:local =“*”。

但是,我收到错误消息:在main.mxml中创建“chatters”组件时,无法将解析为组件实现

一切都在默认软件包中,已经定义了xmlns,Flash Builder如何向我显示这样的错误消息?

最佳答案

也许对于使用哪个类感到困惑。您的src/目录似乎包含chatters.aschatters.mxml。其中的每个都定义了一个名为chatters的类。

我只是试图用MXML文档的相同名称创建一个Actionscript类,但是Flash Builder不允许我这样做。希望有一个有趣的故事,关于您如何做到这一点:)

当在同一文件夹中具有相同名称的2个文件.as和.mxml时,Flash Builder会感到困惑。

关于flash - 无法解析<local :chatters> to a component implementation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12000031/

相关文章:

cocos2d-iphone - 在Xcode中禁用Apple Mach-o链接器错误

matlab - 在matlab中创建一个exe文件的问题

c# - 较少严格的CodeDomProvider来编译DLL

android - 编译应用程序时出现LogCat错误

c# - 第一次使用msbuild

c# - 简单的代理asp.net错误

windows - libqxt编译-mingw32-make异常

.net - ObservableCollection-无法实现,因为它没有匹配的返回类型

visual-studio-2010 - USBView编译错误

actionscript-3 - 在函数外部使用变量。错误-参数数目不正确。预期1