我正在尝试使用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>
答案 0 :(得分:1)
SolidColorStroke不属于Spark主题。尝试使用mx:SolidColorStroke而不是s:SolidColorStroke。与GradientEntry相同。
答案 1 :(得分: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"/>