Compiling AIR or what is the right SDK
November 17th, 2008 • AIR
This is no tutorial about creating ant build files and so on. you can find a good one with a sample project at the FDT blog. It’s for AIR 1.0 but you just have to change the descriptor xml to the new format and it should work.
This post is all about using the right SDK. With the release of AIR 1.5 some of you might switch and run into the same problems I did when I set up my first AIR project. Compiling for AIR is a little bit more strict and bound to the SDK than compiling for FlashPlayer. If you want to target for instance FlashPlayer 9 you could use Flex SDK 3.0, 3.2 or even a beta release of Gumbo (4.0), as long as you don’t use any of the classes or functions that are related with FlashPlayer 10 (e.g. the Vector class).
Compiling for AIR is a little bit different. The SDK is more or less bound to the version you want to target, so you have to use the right SDK in combination with the right definition in the application descriptor file.
<application xmlns="http://ns.adobe.com/air/application/1.1"> ... </application>
As you can see this descriptor is for AIR 1.1. If you try to compile with the SDK 3.2 which targets AIR 1.5 you will get a compile error (“error while loading initial content”).
Just keep that in mind and use the right SDK:
- AIR 1.0 – Flex SDK 3.0
- AIR 1.1 – Flex SDK 3.1
- AIR 1.5 – Flex SDK 3.2
You can find a list of milestone releases, stable and nigthly builds at the Adobe Open Source site.