错误“无法解析”尝试使用 Ant 编译 Flex 4 SWC 时
我正在尝试使用 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>
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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
SolidColorStroke 不属于火花主题。尝试使用 mx:SolidColorStroke 而不是 s:SolidColorStroke。与 GradientEntry 相同。
SolidColorStroke doesn't belong to Spark theme. Try to use mx:SolidColorStroke instead of s:SolidColorStroke. Same with GradientEntry.
有关相关问题的讨论,请访问 forums.adobe.com。
建议的解决方法或解决方案是显式指定所有 Spark (Flex4) 和 Halo (Flex3) 相关的类命名空间,例如
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.