Skip to main content
Aloseous
Participant
November 18, 2009
Answered

Could not resolve <Application> to a component implementation.

  • November 18, 2009
  • 2 replies
  • 29002 views

Hi..

Am getting an error message Could not resolve <Application> to a component implementation. Am trying the following mxml code.

<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/08/25/saving-files-locally-using-the-filereference-classs-save-method-in-flash-player-10/ -->
<Application name="FileReference_save_test"
        xmlns="http://ns.adobe.com/mxml/2009"
        xmlns:mx="library:adobe/flex/halo"
        xmlns:net="flash.net.*"
        layout="flex.layout.BasicLayout"
        creationComplete="init();">
 
    <Script>
        <![CDATA[
            private function init():void {
                textArea.text = describeType(FileReference).toXMLString();
            }
 
            private function btn_click(evt:MouseEvent):void {
                fileReference.save(textArea.text, "describeType.txt");
            }
        ]]>
    </Script>
 
    <Declarations>
        <net:FileReference id="fileReference" />
    </Declarations>
 
    <mx:Panel id="panel"
            width="500"
            height="300"
            verticalCenter="0"
            horizontalCenter="0">
        <mx:TextArea id="textArea"
                editable="true"
                width="100%"
                height="100%" />
        <mx:ControlBar horizontalAlign="right">
            <Button id="btn"
                    label="Save Text"
                    click="btn_click(event);" />
        </mx:ControlBar>
    </mx:Panel>
 
</Application>..

Help plz..
    This topic has been closed for replies.
    Correct answer

    You are missing the namespaces:

    <s:Application name="Spark_Scroller_hasFocusableChildren_test"
            xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark">

    If this post answers your question or helps, please mark it as such.

    2 replies

    Participant
    January 27, 2010

    H

    since updating to the latest nightly build of the sdk, I get the same error for DataGrids, Images and Text. I have the namespaces in place as discussed above. Anything I missed?

    Participant
    August 28, 2011

    Hi hedberg.biz,

                                i have faced the similiar issue.I came across this article .Hope this could help you to solve the issue

    [Refer this link]

    November 18, 2009

    You have <Application> but you need <s:Application> (Flex 4) or <mx:Application> (Flex3). Change the closing tag as well.

    If this post answers your question or helps, please mark it as such.

    Aloseous
    AloseousAuthor
    Participant
    November 18, 2009

    Thanks for the reply.

    I replace the <Application> to <s:Application>. I checked in both the compiler sdk 3 and sdk 4. For sdk 4 <s:Application>. and for sdk 3<mx:Application>.

    <s:Application> gives me a error  "The prefix "s" for element "s:Application" is not bound."

    <mx:Application>. giving Could not resolve <mx:Application> to a component implementation.

    I refer the mxml code from http://blog.flexexamples.com/2008/08/25/saving-files-locally-using-the-filereference-classs-save-method-in-flash-player-10/

    Correct answer
    November 18, 2009

    You are missing the namespaces:

    <s:Application name="Spark_Scroller_hasFocusableChildren_test"
            xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark">

    If this post answers your question or helps, please mark it as such.