1

I'm trying to compile a component using ant and keep getting this error message throughout the component . . .

ButtonSkin.mxml(179): Error: Could not resolve <s:SolidColorStroke> to a component implementation.
ButtonSkin.mxml(210): Error: Could not resolve <s:GradientEntry> to a component implementation.

It compiles fine in FlashBuilder 4. Here is the contents of the build.xml:

<project name="Flex Ant Tasks Build Script" default="compile flex project">
  <property name="FLEX_HOME" value="c:/build/flex_sdk" />
  <property name="SDK_VERSION" value="4.1.0.16076" />
  <taskdef resource="flexTasks.tasks" classpath="c:/build/flex_sdk/lib/flexTasks.jar"/>
  <echo message="File: ${FLEX_HOME}"/>
  <!-- Build and output the Main.swf-->
  <target name="compile flex project">
    <compc output="${basedir}/../FlexSI/libs/MyLibrary.swc" locale="en_US">
 <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />         
      <source-path path-element="${basedir}/src"/>
      <include-sources dir="${basedir}/src" includes="*" />
      <library-path dir="${basedir}/libs" includes="*" append="true"/>
      <namespace uri="http://testapp.com/siLibrary" manifest="${basedir}/src/xml/manifest.xml" />
    </compc>
  </target>
</project>
SkunkSpinner
  • 11,429
  • 7
  • 40
  • 53

2 Answers2

1

SolidColorStroke doesn't belong to Spark theme. Try to use mx:SolidColorStroke instead of s:SolidColorStroke. Same with GradientEntry.

tefozi
  • 5,390
  • 5
  • 38
  • 52
1

Discussion on the related issue at forums.adobe.com.

Suggested workaround or solution is to explicitly specify all Spark (Flex4) and Halo (Flex3) related class namespaces, e.g.

<namespace uri="library://ns.adobe.com/flex/spark" manifest="${FLEX_HOME}/frameworks/spark-manifest.xml"/>    
<namespace uri="http://ns.adobe.com/mxml/2009" manifest="${FLEX_HOME}/frameworks/mxml-2009-manifest.xml"/> 
<namespace uri="http://www.adobe.com/2006/mxml" manifest="${FLEX_HOME}/frameworks/mxml-manifest.xml"/>
JabbyPanda
  • 872
  • 5
  • 13