使用flex builder和flex sdk编译项目时的差异

发布于 2024-08-02 01:23:09 字数 630 浏览 2 评论 0原文

以下代码在 flex builder 3 中可以正常编译,但在使用命令行和 flex sdk 3.3 编译时会抛出错误。

<?xml version="1.0" encoding="utf-8"?>
<ww:TestApplication
    xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:ww="*"
    layout="absolute"
    backgroundColor="#FFFFFF"
    >
    <mx:Label x="10" y="10" text="simple test"/>
</ww:TestApplication>

错误消息是:无法找到组件类“TestApplication”的指定基类“TestApplication”。

仅当我为自定义类使用默认包时才会出现此问题。 相反,如果我相应地使用

xmlns:ww="somepackage.*"

并更改我的匹配 AS 类,那么它可以使用 sdk 正常编译。 我在编译时错过了参数吗? 使用flex builder和flex sdk编译项目有区别吗? 如果有,是哪些?

The following code compiles fine in flex builder 3, but throws an error when compiled using the command line and flex sdk 3.3.

<?xml version="1.0" encoding="utf-8"?>
<ww:TestApplication
    xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:ww="*"
    layout="absolute"
    backgroundColor="#FFFFFF"
    >
    <mx:Label x="10" y="10" text="simple test"/>
</ww:TestApplication>

The error message is: Unable to locate specified base class 'TestApplication' for component class 'TestApplication'.

The problem only happens when I use the default package for my custom classes. If instead I use

xmlns:ww="somepackage.*"

and change my matching AS class accordingly, then it compiles fine using the sdk. Am I missing an argument when compiling or something? Are there differences when compiling a project using flex builder and flex sdk? If so, which ones?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

清醇 2024-08-09 01:23:09

必须使用 mxmlc 或 compc 显式定义路径。 以下是标志的解释:

source-path 用于定义源的路径(如果不是默认的):

mxmlc -source-path path1 path2 path3 c:/myFiles/app.mxml

library-path 用于定义库的路径:

mxmlc -library-path [AIR SDK]/frameworks/libs/air/airframework.swc, ^ [AIR SDK]/frameworks/libs/air/airframework.swc, ^ -library-path [Flex SDK]/frameworks/libs/framework.swc ^ -- myApp.mxml

file-specs用于定义mxml文件:

mxmlc --strict=true --file-specs MyFirst.mxml

runtime-shared-libraries 用于定义 RSL 路径:

mxmlc -external-library-path+=../lib/myLib.swc -runtime-shared-libraries=myrsl.swf -- myApp.mxml

参考

The paths have to be explicitly defined using mxmlc or compc. Here is an explanation of the flags:

source-path is used to define the path to the source if it is not in the default:

mxmlc -source-path path1 path2 path3 c:/myFiles/app.mxml

library-path is used to define the path to libraries:

mxmlc -library-path [AIR SDK]/frameworks/libs/air/airframework.swc, ^ [AIR SDK]/frameworks/libs/air/airframework.swc, ^ -library-path [Flex SDK]/frameworks/libs/framework.swc ^ -- myApp.mxml

file-specs is used to define the mxml file:

mxmlc --strict=true --file-specs MyFirst.mxml

runtime-shared-libraries is used to define the RSL path:

mxmlc -external-library-path+=../lib/myLib.swc -runtime-shared-libraries=myrsl.swf -- myApp.mxml

References

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文