1

我正在尝试使用 ant 编译组件并在整个组件中不断收到此错误消息。. .

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.

它在 FlashBuilder 4 中编译良好。这是 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>
4

2 回答 2

1

在forums.adobe.com上讨论相关问题。

建议的解决方法或解决方案是明确指定所有 Spark (Flex4) 和 Halo (Flex3) 相关的类命名空间,例如

<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"/>
于 2010-11-08T15:43:44.507 回答
1

SolidColorStroke不属于 Spark 主题。尝试使用 mx:SolidColorStroke 而不是 s:SolidColorStroke。与 GradientEntry 相同。

于 2010-11-01T21:04:58.870 回答