Drainbamage.nl blog of Christiaan Ottow

24Aug/090

Compiling for AIR 1.5

When compiling an AIR application in Flex Builder for AIR 1.5, there are some pitfalls to reckon with.

First, you need to install the Flex 3.3 SDK. If you're running an older Flex Builder, it will have 3.1 or 3.2 included. You can download the Flex SDK from Adobe here: http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3sdk. Be sure to also download the file labelled "ADOBE FLEX 3.3 DATA VISUALIZATION COMPONENTS FOR FLEX BUILDER".

After downloading, unzip the SDK somewhere and remember the location. Then, in Flex Builder, go to the preferences -> installed Flex SDKs -> Add. Enter the location of the SDK you unzipped.

Some of your apps might use classes that are no longer included with the SDK but bundled separately in the Flex Data Visualization Components you just downloaded. You will know this when you get an error like the following:

1017: The definition of base class HierarchicalData was not found.

Unzip the data visualization components zip, and move the swc and other files in it to the Flex 3 SDK dir in the fashion described in the readme.

Now, you need to change the namespace of the AIR app to 1.5. This is similar to setting the target Flash Player version in a Flex project. It is done by editing the -app.xml file belonging to the project and changing the first line to:

<application xmlns="http://ns.adobe.com/air/application/1.5">

If you get the following error: "error while loading initial content" when running an AIR app, you have upgraded your SDKs to 3.3 but not changed the namespace to 1.5.

Well, that's it, not so bad after all.

Post to Twitter Tweet This Post

   

Twitter links powered by Tweet This v1.7, a WordPress plugin for Twitter.