The FlashChemist!

My Experiments and Thoughts on the Flash Platform

Get AIR 2.0 SDK Work on Your Flex Builder 3.0

3 comments

I have been trying to get AIR 2.0 beta work on my Flex Builder 3.0 on Windows (I am using XP, but it should be more or less same on all Win boxes). I didnt find any straight forward tutorial from anyone which takes us the step-by-step way :)

I did make it work, so here is how:

Its obvious that you will have Flex Builder 3.0 installed on your machine. I am using Flex Builder 3.0 plug-in on Eclipse Ganymede.

Download the AIR 2.0 beta SDK from Adobe Labs. Its a zip file which is intended to ovelay your current SDK, that means its a collection of files which are going to replace your current files in the SDK folder.

Next, make a copy of your latest SDK. I am using 3.4.0, so I made a copy of that folder and named it ‘3.4.0.air.2.0beta’. Hope you know where will be the SDK placed. For me it was under ‘C:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks’. It may vary for you.

Copy the downloaded zip file inside this SDK folder you created new (3.4.0.air.2.0beta). Right click and say unzip/unarchive/extract all or whatever the utility you are using is saying.

Here, you need to make sure that you are not extracting the zip to a new folder. You should extract the contents of the zip to the root of the folder ‘3.4.0.air.2.0beta’. Make sure you mention to overwrite the files while unzipping. It basically gets you new airglobal.swc and other supporting files (like adl).

Now go back to your project explorer, and create new AIR project.

Right click on the project and select ‘Properties’ and move to ‘Flex Compiler’ tab (shown below)

Click on the ‘Configure Flex SDK’ link. It will open the Flex SDK configuration window (shown below)

Click on Add and add your new SDK you created now (for me the folder ‘3.4.0.air.2.0beta’ and I named it 3.4.0 AIR2). Click OK.

Come back to the project properties window, and select the new SDK from the list (as shown below). You need to select the ‘Use specific SDK radio button, and select the new SDK from the list.

Now you have your AIR 2.0 beta SDK set-up. But this is not it, you have to do one more thing. Open up your application XML file (it should be named ‘YourProjectName-app.xml’. You have to change namespace to 2.0beta if its not set already. The top part of the file will look like below:

http://ns.adobe.com/air/application/1.5.3 will become http://ns.adobe.com/air/application/2.0beta

Now, you should have access to all of your AIR 2.0 api’s. If you are using OS specific API’s like NativeProcess, File.openWithDefaultApplication() methods, you need to add one more tag to your application XML. Please see the tag in the above picture.

Now, hopefully you have everything working with new SDK.

If you are a MAC user, follow this post which tells you how to do it on a MAC OSX.

Hope it helps someone. Happy beta testing… Let me…no no Let Adobe know if you have any issues with the new SDK ;)

Written by Vipin

March 3rd, 2010 at 4:32 pm

Posted in AIR

Tagged with

3 Responses to 'Get AIR 2.0 SDK Work on Your Flex Builder 3.0'

Subscribe to comments with RSS or TrackBack to 'Get AIR 2.0 SDK Work on Your Flex Builder 3.0'.

  1. I am still getting error.. I followed all the steps that are in release notes…

    VerifyError: Error #1014: Class flash.events::StorageVolumeChangeEvent could not be found.

    Abhijit

    11 May 10 at 7:18 pm

  2. I have upgraged 2.0beta to 2.0 following your article. Its very much usefull. But now i get a error when tryng to open a file with openDefaultApplication in air. Am I missing something?

    Supritha

    10 Jul 10 at 5:21 am

  3. Whats the error you are getting?

    Vipin

    28 Jul 10 at 7:44 pm

Leave a Reply