4 Replies Latest reply on Dec 14, 2010 7:02 PM by zach528

    Error: cannot resolve MobileApplication to component implementation

    zach528

      I'm using Flex 4.5's amxmlc command-line compiler. Here's my code (same as test drive code, but no images):

       

       

      ******************************************************************************

      MobileTest.mxml

       

      <?xml version="1.0" encoding="utf-8" ?>
      <s:MobileApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
          xmlns:s="library://ns.adobe.com/flex/spark"
          firstView="views.MobileTestHome">
      </s:MobileApplication>

       

      MobileTestHome.mxml

       

      <?xml version="1.0" encoding="utf-8" ?>
      <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
              xmlns:s="library://ns.adobe.com/flex/spark"
              xmlns:components="spark.components.*"
              xmlns:mx="library://ns.adobe.com/flex/mx"
              title="Home">
          <s:titleContent>
              <mx:Spacer width="15" height="100%"/>
              <s:TextInput id="searchTxt" width="100%" text="Employee Name"/>
              <mx:Spacer width="15" height="100%"/>
          </s:titleContent>
          <s:actionContent>
              <s:Button id="searchBtn" width="48" height="48"/>
              <s:Button id="addBtn" width="48" height="48"/>
          </s:actionContent>
          <s:List id="emplist" left="0" right="0" top="0" bottom="0"></s:List>
      </s:View>

       

       

       

      Directory structure:

       

      src

      -----MobileTest.mxml

      -----views

      ---------MobileTestHome.mxml
      ******************************************************************************

       

       

      When I run "amxmlc MobileTest.mxml" on the command line, the following error is produced:

       

      Error: Could not resolve <s:MobileApplication> to a component implementation.

                               firstView="views.MobileTestHome.mxml">

       

      What am I doing wrong? I'm new to Flex, and I'm trying to translate the Flash Builder Mobile Test Drive video to open source flex, and this might be the source of error.