Developing for PlayBook with the AIR 2.6 SDK

The most recent release of the Adobe AIR SDK is version 2.6. With this version of the SDK you can target the AIR 2.6 runtime on multiple platforms. However, one platform that you cannot yet target yet is the BlackBerry PlayBook. At launch the PlayBook, device and simulator, only support the AIR 2.5 runtime. This means that any application which targets anything higher then AIR 2.5 will not work on the PlayBook. There are a couple of things to consider when developing for PlayBook using the AIR 2.6 SDK.

The first and biggest issue is that the newer versions of the Flex 4.5 Hero Framework only support AIR 2.6. This means that you will only be able to create ActionScript only projects, which do not use any of the Flex Hero components. The public preview of Flash Builder 4.5, which is available on Adobe Labs, contains a very early version of the Flex Hero Framework and targets AIR 2.5, which is why this works today. However, when Flash Builder 4.5 ships and anyone using the pre-release version will not be able to create Flex Hero applications for the PlayBook until the runtime is updated.

When using Flash Builder and the AIR 2.6 SDK for developing your applications, Flash Builder will auto generate a application descriptor file, which targets the AIR 2.6 runtime. If you try to run this in the Simulator or on the PlayBook device the application will instantly crash without any real reason. There are 2 small items that you can do in order to workaround this issue. These steps are meant to be done with the BlackBerry Tablet OS AIR SDK 1.0.1

First, you need to make sure you compile your swf to Flash Player 10. This can easily be done with the following command if you are using the command line. -swf-version=10. If you are using Flash Builder you can go to Project > Properties > ActionScript Compiler and place it into the Additional Compiler Arguments field.

The second thing you need to do is force your application to target the AIR 2.5 runtime. Because you may be targeting AIR 2.6 for other platforms you do not want to change it directly in the -app.xml file. To get around this the PlayBook has an option to force the air version to a specific value when packaging your application. To set this you can use the following command on the command line -forceAirVersion 2.5. Or if you are using Flash Builder you can go to Project > Properties > ActionScript Build Packaging > BlackBerry Tablet OS > Advanced and place the command in the extra packaging options field.

With these 2 workarounds you should be able to now target AIR 2.6 for iOS and Android and 2.5 for the PlayBook. I hope that helps solve some of the confusion people are having

Continue reading » · Written on: 04-22-11 · 6 Comments »

6 Responses to “Developing for PlayBook with the AIR 2.6 SDK”

  1. alex wrote:

    I tried the options you mentioned in this article for the PlayBook 1.0.1 sdk and air 2.6. My test project no longer crashes using the latest pre-release build of Flash builder. However, the application gets stuck on the splash screen of my project and does not go any further. The same behavior occurs on the physical PlayBook as well as the simulator.

    April 22nd, 2011 at 1:49 pm
  2. Julian wrote:

    Hey Alex,

    The symptom you are seeing sounds like your application wasn’t compiled with the following -swf-version=10 ActionScript compiler flag. If it is still doing this once you have added it, try doing a Project > Clean on your application.

    April 22nd, 2011 at 2:00 pm
  3. alex wrote:


    I just realized you were talking about an ActionScript mobile project. I was using the Flex Mobile Project and that is why I was getting stuck on the splash screen/white screen with your settings. The Action Script mobile project is working fine using the settings you mentioned above.

    I want to try out the list component which has been updated in the flex 4.5 pre-release. The current list component in the burrito release is choppy/lags on the PlayBook. Any way I can incorporate the Flex components into the ActionScript project or get the Flex Mobile project to launch properly on the PlayBook?

    Thank you for your time and effort!

    April 22nd, 2011 at 2:31 pm
  4. Jesse Freeman wrote:

    Also an important note that when using -forceAirVersion 2.5 you need the – in fornt of it. The way the text wraps on your bloc the – is on the line above forceAirVersion 2.5. Will save you 5 mins of wondering what is going on. This all worked for me finally. Thanks for the info.

    April 22nd, 2011 at 6:07 pm
  5. Nishant Kyal wrote:

    Thanks. Saved me a lot of trouble, blackberry development has it’s own quirks and less time spent cussing the better :D

    May 19th, 2011 at 7:13 am
  6. Marc wrote:

    I know this is an old post, but I figured a comment here for those who came across it via google would be worth posting: in the current (June and later) versions of PlayBook and AIR SDKs, and 4.5.1+ Builder, this workaround is no longer necessary. PlayBook has the appopriate runtime support for 2.6

    August 24th, 2011 at 4:23 pm

Leave a Reply