在Adobe Flash Builder 4中使用Flex 4.5和4.0 [英] Use Flex 4.5 and 4.0 in Adobe Flash Builder 4

查看:179
本文介绍了在Adobe Flash Builder 4中使用Flex 4.5和4.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当新的 Flex SDK 4.5 已经成为一个稳定发布,我想升级我的应用程序到新的SDK。但是,不会丢失与SDK 4.0编译完美的工作。我使用Flash Builder 4.0来构建它们。有什么办法在Flash Builder中使用4.0和4.5进行有条件编译,并在单独的bin-debug文件夹中创建两个发行版本? 解决方案

Flash Builder支持多个SDK;但是每个项目只能使用一个SDK。您有几个选择:

$ ol

  • 使用诸如ANT之类的构建工具来创建构建。这可能是最优雅的,但可能需要最多的设置。

  • 创建两个项目;每个SDK一个。将每个项目的源目录指向同一个源。如果您需要进行特定于SDK的更改,则会长期出现问题。

  • 在需要使用不同版本重新编译时,切换项目上的SDK。这很容易做到;但是如果你这么做的话会很乏味。

  • 对于Flextras组件,我为每个SDK保留了不同的代码分支。这是因为由于SDK的变化,我们经常需要不同版本的代码。举一个例子,通过我们的 Spark AutoComplete 组件,引入了Flex 4.5 Flex 4或Flex 4.1中没有的错误。所以我们有一个Flex 4版本和一个Flex 4.5版本。



    在大多数传统应用程序开发中,我不认为支持具有相同代码库的多个SDK是非常重要的。


    As the new Flex SDK 4.5 has become a stable release, I want to upgrade my apps to the new SDK. But without losing compilation with SDK 4.0 with which they are working perfectly well. I used Flash Builder 4.0 to build them. Is there a way in Flash Builder to conditionally compile with 4.0 and 4.5 and create two release versions in separate bin-debug folders?

    解决方案

    Flash Builder supports multiple SDKs; but you can only use a single SDK per project. You have a few options:

    1. Use a build tool such as ANT to create your builds. This is probably the most elegant, but probably requires the most setup.
    2. Create two projects; one for each SDK. Point the source directory on each project to the same source. This will cause problems long term if you need to make SDK specific changes.
    3. Switch SDKs on the project when you need to recompile with a different version. This is easy to do; but will be tedious if you do this a lot.

    For Flextras components, I keep a different branch of the code for each SDK. This is because due to SDK changes, we often need different versions of code. As one example, with our Spark AutoComplete component, Flex 4.5 introduced a bug that was not there in Flex 4 or Flex 4.1. So we have a Flex 4 version and a Flex 4.5 version.

    In most traditional application development, I would not expect it was important to support multiple SDKs w/ the same code base.

    这篇关于在Adobe Flash Builder 4中使用Flex 4.5和4.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆