Sunday, February 1, 2009

Flex Bulider 3.0.2 update does not update AIR projects 1.0=>1.5

Well I updated my Flex Builder plugin from 3.0.1 to 3.0.2 looking to get all the goodness of AIR 1.5 and Flash Player 10. You might be thinking I'm a bit late on the scene with the update being out for about 3 months now but there appears to be a bug with the updater in Eclipse (See Matt Chotin's comment at 30 Jan). Anyhow I installed the update to find my AIR projects not doing anything when I run or debug them. Almost like they were crashing straight off the bat. I created a new AIR project to see if the updater had screwed my system but no the new AIR project worked fine. I then added the 3.0.1 SDK back in since 3.0.2 was the new default and set the project to use it I had no problems. This didn't sit right with me that my AIR projects couldn't use the updated SDK and AIR runtime. I had a look around and noticed the the XML config file for the AIR application was 1.0 I changed it to 1.5 and set the SDK to 3.0.2. The project ran and debugged fine now...

So what does this mean? If you change your SDK the Flex plugin does not update your AIR app config file to the correct version of AIR. Must admit I would expect if you complied an app with a previous version of the 3.0.* SDK that it would still run in the AIR 1.5 runtime. I think there is a little more to this story but I'll leave it here for the moment.

So it appears that changing your SDK version does not update your AIR config file so how to fix?

Change the second line in your myapp-app.xml file from:
<application xmlns="http://ns.adobe.com/air/application/1.0">
To:
<application xmlns="http://ns.adobe.com/air/application/1.5">

No comments: