4 Replies Latest reply on Dec 9, 2010 9:13 AM by flairjax

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

    flairjax Level 1

      So I have a library project and in that project I have a CustomDataGridBackgroundSkin file which is as follows:

       

      <?xml version="1.0" encoding="utf-8"?>
      <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   minWidth="25" minHeight="25">
          <fx:Declarations>
              <!-- Place non-visual elements (e.g., services, value objects) here -->
          </fx:Declarations>
         
          <!-- layer 4: fill highlight -->
          <s:Rect left="0" right="0" top="0" height="100%" >
              <s:fill>
                  <spark:SolidColor color="0x968f89" alpha="1" />
              </s:fill>
          </s:Rect>
         
      </s:SparkSkin>

       

      I am simply trying to get an ant task to compile this library to SWC, but I am getting a " Error: Could not resolve <s:SolidColor> to a component implementation" error during compile.  The only way to fix it is to add these lines of code (bold).

       

      <?xml version="1.0" encoding="utf-8"?>
      <s:SparkSkin 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:spark="mx.graphics.*"
                   minWidth="25" minHeight="25">
          <fx:Declarations>
              <!-- Place non-visual elements (e.g., services, value objects) here -->
          </fx:Declarations>
         
          <!-- layer 4: fill highlight -->
          <s:Rect left="0" right="0" top="0" height="100%" >
              <s:fill>
                  <spark:SolidColor color="0x968f89" alpha="1" />
             
      </s:fill>
          </s:Rect>
      </s:SparkSkin>

       

      I can also get this error to go away if I put this line in my build.xml file: "<include-sources dir="${src.dir}" includes="*"/>"

      But then I get this error => "[compc] Error: Unsupported file type: C:\dev_projects\features\flex4version\web\OneVoice\src\components.xml"

       

      components.xml is my manifest file.

       

      Anyone know what the issue is?  Why would I need the xmlns:spark="mx.graphics.*" namespace when I have xmlns:s="library://ns.adobe.com/flex/spark"?