3 Replies Latest reply on Jan 26, 2011 11:18 AM by zeldar

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

    zeldar Level 1

      So I am trying to setup states on a Flex application I'm building, but it doesn't seem to want to compile. I get this error:

       

       

      $ ./build.sh

      Loading configuration file /Applications/Adobe Flash Builder 4/sdks/4.1.0/frameworks/flex-config.xml

      uploader.mxml(24): Error: Could not resolve <s:states> to a component implementation.

       

          <s:states>

      Here is my build command nothing special ...
      $ cat ./build.sh
      #!/bin/bash
      mxmlc -output bin/uploader.swf src/uploader.mxml
      I have a class that extends the Spark application like so ...
      package com.uploader.controllers
      {
          import spark.components.Application;
           dynamic public class FlashUploader extends Application
           {
                ...
           }
      }
      Then in my main application mxml file I use it like so ...
      <?xml version="1.0" encoding="utf-8"?>
      <c:FlashUploader 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:v="com.uploader.view"
          xmlns:c="com.uploader.controllers.*"
          minWidth="709" minHeight="400"
          skinClass="com.uploader.skins.UploaderApplicationSkin">
          <fx:Style source="styles.css" />
          <!-- states -->
          <s:states>
              <s:State name="default" />
              <s:State name="startup" />
              <s:State name="uploading" />
              <s:State name="normal" />
          </s:states>
          ....
      </c:FlashUploader>
      Now when I try to compile I get the states error. I've found several examples and even made a dummy app just using the spark application and it compiles fine. Not sure if I'm doing anything weird here but the few other flex devs I know don't seem to see anything wrong with what I'm doing that could cause this.