Posts tagged "blackberry"

How To: Use Flex 4.5 with AIR 2.5 on the BlackBerry PlayBook

Update: Troubleshooting “AIR validation failed” message. See below.

Update 2: Using Flex 4.5.1 on the BlackBerry PlayBook

Update 3: RIM has announced BlackBerry Tablet OS 1.0.6 with AIR 2.7. The workaround mentioned below is no longer required.

As you might already know, the BlackBerry PlayBook from RIM will initially be shipping with AIR 2.5, not AIR 2.6 (this is to come later in an update to the device). Flex 4.5 SDK requires AIR 2.6 as the minimum supported runtime – this is because of specific feature support (such as soft keyboard) as well as bug fixes/performance improvements. We know however that a lot of you are eager to develop Flex 4.5 applications for BlackBerry Tablet OS, so I’d like to share an unsupported workaround that you can use in the meantime.

I’ve created a playbook_overrides.swc that monkey patches the release build of the Flex 4.5 SDK to remove all AIR 2.6 dependencies. This allows you to publish a Flex 4.5 application that targets AIR 2.5. Here are some instructions to get you started. Again, keep in mind that this is an unsupported hack until (1) AIR 2.6 is available on the PlayBook and (2) Flex and Flash Builder update to 4.5.x in June 2011.


  • Flash Builder 4.5
  • BlackBerry Tablet SDK and Plugin 1.0.1
  • (Contains playbook_overrides.fxpl, playbook_overrides.swc and TwitterTrendsFinal.fxp example project)


  1. Create a new Flex Mobile project with BlackBerry Tablet OS as a target platform
  2. Add playbook_overrides to the library path. This SWC patches SDK and Mobile Theme classes to remove soft keyboard dependencies. Download:
  3. Open Project Properties > Flex Compiler
  4. Add “-swf-version=10” in “Additional compiler arguments”
  5. Open Project Properties > Flex Build Packaging > BlackBerry Tablet OS > Advanced tab.
  6. Add “-forceAirVersion 2.5”
  7. Run/Debug to device or emulator


  1. Crash on launch (application briefly appears in launcher, then closes).
    Make sure -swf-version=10 is set in additional compiler arguments.
  2. Blank or stuck on splash screen on launch
    Usually indicates a runtime error. Could indicate an AIR 2.6 dependency VerifyError.
  3. Error dialog when packaging: “error 102: invalid namespace Error: AIR validation failed”
    Change the namespace in your /project/src/project-app.xml from “2.6.0” to “2.6”

Next Steps

  • Refactor your project into 2 projects to target Android with AIR 2.6 support and BlackBerry Tablet OS with AIR 2.5 support simultaneously
  • Use the BlackBerry Tablet SDK for native controls in your Flex Mobile project
  • Try the TwitterTrendsFinal.fxp in the This FXP already links playbook_overrides.swc and is ready to deploy. All it needs is an update to blackberry-tablet.xml to add the <author> and <authorId> of your debug token to deploy to a PlayBook.
Share on Facebook