Adding AIR 2.7 SDK within Flash Professional CS5.0
If like me you haven't upgraded to Flash CS5.5 yet however you'd still like to take advantage of the newly released AIR 2.7 SDK then the below instructions will help you in adding AIR2.7 into your existing Flash CS5 install.
The steps are similar to the official instructions provided by Adobe for Overlaying AIR 2.7 SDK for Flash Professional CS5.5 with small changes to make things work inside CS5.0 instead.
- Download and extract the latest AIR 2.7 SDK.
- Download and install Flash CS5.5 Trial. You will need some required files from the AIR2.6 SDK that ships with Flash CS5.5 that don't exist in Flash CS5.0.
- Ensure that Flash Professional CS5 and Flash Professional CS5.5 are both closed.
- Rename the unzipped SDK folder to AIR2.6 (yes instead of 2.7. This is because the adobe dll files are hard coded to look in the 2.6 folder).
- Place the folder in either of the following locations:
WIN: C:\Program Files\Adobe\Adobe Flash CS5\
OSX: Applications/Adobe Flash CS5/ - WIN: Browse to Adobe Flash CS5.5/en_US/Configuration/External Libraries/ and copy Air2_5.dll and Air2_5_Android.dll and paste these files into Adobe Flash CS5/en_US/Configuration/External Libraries/
OSX: Browse to Adobe Flash CS5.5/Common/Configuration/External Libraries/ and copy Air2_5.bundle and Air2_5_Android.bundle and paste these files into Adobe Flash CS5/Common/Configuration/External Libraries/
- Browse to the AIR2.6/frameworks/libs/air/ folder in the Adobe Flash CS5 folder and copy airglobal.swc.

- Paste the SWC file in Adobe Flash CS5/Common/Configuration/ActionScript 3.0/AIR2.7/. You will need to create this AIR2.7 folder.

- Browse to Adobe Flash CS5/Common/Configuration/Players/ and clone AdobeAIR2_0.xml as AdobeAIR2_7.xml. If you would like to add a new target for Android then additionally clone AiriPhone.xml as Android.xml. Note: You may need administrative access to do this.

- Modify the new files so that they match the one's below. Note: You cannot have multiple PFI (Packager for iPhone) outputs so for iOS you will have to replace AIR 2.0 for iPhone with Air 2.7 for iPhone. UPDATE 22/06/11: I've revised the XML examples for Android and iOS. I recommend updating them if you followed these instructions before then.
- To add a new AIR 2.7 target edit AdobeAIR2_7.xml to match the below xml.
< ?xml version="1.0" encoding="UTF-8"?> <players> <player id="AdobeAIR2_7" version="12" asversion="3" minasversion="3"> <name>Adobe AIR 2.7</name> <publishobject2 id="Air2_5" version="2.6" intversion="2.6"></publishobject2> <path platform="WIN">Air2_5.dll</path> <path platform="MAC">Air2_5.bundle</path> <playerdefinitionpath as2="$(UserConfig)/Classes/FP9;$(UserConfig)/Classes/FP8;$(UserConfig)/Classes/FP7" as3="$(AppConfig)/ActionScript 3.0/AIR2.7/airglobal.swc" /> <!-- This item is used to indicate that some UI integrated within Flash should be enabled for this player. --> <feature name="multiScreenPublish" supported="false" /> <feature name="mobileDebug" supported="true" /> <feature name="apolloPublish" supported="true" /> <feature name="apolloTestMovie" supported="force"/> <feature name="apolloDebugMovie" supported="true"/> <feature name="apolloPackaging" supported="true"/> <feature name="publish_localPlaybackSecurity" supported="false" /> <feature name="publish_hardwareAcceleration" supported="true" /> <feature name="useDefineFont4ForDeviceText" supported="true" /> <feature name="useDefineFont4ForEmbeddedFonts" supported="true" /> <feature name="textLayoutFramework" supported="true" /> <encodingpresets> <preset uuid="0c95a8ba-8b71-44d5-b269-8fd1cf89a6ed" name="F4V - Same As Source (Flash 9.2 and Higher)" ext="f4v" default="true"/> </encodingpresets> </player> </players>
- To replace AIR 2.0 for iPhone with AIR 2.7 for iOS you can modify AiriPhone.xml to match the below xml, or alternatively replace it with the AiriPhone.xml located in Adobe Flash CS5.5/Common/Configuration/Players/
< ?xml version="1.0" encoding="UTF-8"?> <players> <player id="PFI1_0" version="12" asversion="3" minasversion="3"> <name>AIR for iOS</name> <publishobject2 id="Air2_5" version="2.6" intversion="2.6"></publishobject2> <path platform="WIN">Air2_5.dll</path> <path platform="MAC">Air2_5.bundle</path> <playerdefinitionpath as2="$(UserConfig)/Classes/FP9;$(UserConfig)/Classes/FP8;$(UserConfig)/Classes/FP7" as3="$(AppConfig)/ActionScript 3.0/AIR2.7/airglobal.swc" /> <!-- This item is used to indicate that some UI integrated within Flash should be enabled for this player. --> <feature name="multiScreenPublish" supported="false" /> <feature name="mobileDebug" supported="true" /> <feature name="apolloPublish" supported="true" /> <feature name="apolloTestMovie" supported="force"/> <feature name="apolloDebugMovie" supported="true"/> <feature name="apolloPackaging" supported="true"/> <feature name="publish_localPlaybackSecurity" supported="false" /> <feature name="publish_hardwareAcceleration" supported="true" /> <feature name="useDefineFont4ForDeviceText" supported="true" /> <feature name="useDefineFont4ForEmbeddedFonts" supported="true" /> <feature name="textLayoutFramework" supported="true" /> <feature name="rslLinkageSuppressed" supported="true" /> <encodingpresets> <preset uuid="0c95a8ba-8b71-44d5-b269-8fd1cf89a6ed" name="F4V - Same As Source (Flash 9.2 and Higher)" ext="f4v" default="true"/> </encodingpresets> </player> </players>
- To add a new AIR 2.7 for Android target edit Android.xml to match the below xml, or alternatively replace it with the Andriod.xml located in Adobe Flash CS5.5/Common/Configuration/Players/
< ?xml version="1.0" encoding="UTF-8"?> <players> <player id="android_0" version="12" asversion="3" minasversion="3"> <name>AIR for Android</name> <publishobject2 id="Air2_5_Android" version="2.6" intversion="2.6"></publishobject2> <path platform="WIN">Air2_5_Android.dll</path> <path platform="MAC">Air2_5_Android.bundle</path> <playerdefinitionpath as2="$(UserConfig)/Classes/FP9;$(UserConfig)/Classes/FP8;$(UserConfig)/Classes/FP7" as3="$(AppConfig)/ActionScript 3.0/AIR2.7/airglobal.swc" /> <!-- This item is used to indicate that some UI integrated within Flash should be enabled for this player. --> <feature name="multiScreenPublish" supported="false" /> <feature name="mobileDebug" supported="true" /> <feature name="apolloPublish" supported="true" /> <feature name="apolloTestMovie" supported="force"/> <feature name="apolloDebugMovie" supported="true"/> <feature name="apolloPackaging" supported="true"/> <feature name="publish_localPlaybackSecurity" supported="false" /> <feature name="publish_hardwareAcceleration" supported="true" /> <feature name="useDefineFont4ForDeviceText" supported="true" /> <feature name="useDefineFont4ForEmbeddedFonts" supported="true" /> <feature name="textLayoutFramework" supported="true" /> <feature name="rslLinkageSuppressed" supported="true" /> <encodingpresets> <preset uuid="0c95a8ba-8b71-44d5-b269-8fd1cf89a6ed" name="F4V - Same As Source (Flash 9.2 and Higher)" ext="f4v" default="true"/> </encodingpresets> </player> </players>
- To modify existing projects you will need to edit your apps descriptor XML file to target the 2.7 namespace. e.g. change <application xmlns="http://ns.adobe.com/air/application/2.0"> to <application xmlns="http://ns.adobe.com/air/application/2.7">. Alternatively you can delete preexisting descriptor XML files and Flash will automatically set it to the correct namespace on your next publish.
- Restart Flash CS5 and select one of your new AIR 2.7 compatible targets from within Publish Settings.

- You can ensure it's working using the following code which should trace out "2.7.0.19480"
import flash.desktop.NativeApplication; trace(NativeApplication.nativeApplication.runtimeVersion);
Hi there,
Thanks for this post. I have followed your instructions but I am having some problems.
There is no .dll files in the CS5.5 folder you mention ( Adobe Flash CS5.5/en_US/Configuration/External Libraries/ ) only a file called flagFile. Is this because I am on a Mac?
There is a Air2_5.bundle and Air2_5_Android.bundle in Adobe Flash CS5.5/Common/Configuration/External Libraries/ which I copied over to to my equivalent CS5 directory.
When I run Flash CS5, I get AIR2.7 publish option but not Android publish option. I have made all the .xml files.
What am I doing wrong? Thanks.
Hi David,
Cheers for that. I’ll update the post to reflect the differing OSX path. I’ll double check the setup on my macbook when I get home from work tonight and let you know how to get Android working.
Cheers,
Tim
Thanks Tim, silly question (maybe) but do I also need to download an Android SDK as well? Could that be the reason I don’t get an Android option?
Cheers
Hi David,
I’ve updated my post for more accurate OSX paths as per your first comment and I’ve also tweaked the XML examples for iOS and Android. Please update to these new XML files and you should get exporting for Android up and running fine.
Android is included within the AIR 2.7 SDK so the issue was likely a problem with the XML example I posted earlier.
Also note that these new export settings are only available via the Publish Settings window, they will not be added to the Create New screen when you first start Flash CS5.
Any further questions let me know.
Hi David,
Great article. I have tried to do this. But when publishing it get some new errors:
1017: The definition of base class TransformGestureEvent was not found.
1046: Type was not found or was not a compile-time constant: TouchEvent.
What have I done wrong? There are no errors when publishing to Flash player 10.1
I also got the error that the definition of some classes such as TransformGestureEvent cant be found.
How can I fix the problem? I have already replaced the airglobal.swc. Do I need to update the PFI as well ?
Yep that seems to have done the job. Thanks Tim.
Hi Tim,
This tutorial is fantastic!
I hit a snag after completing the whole thing – built a basic AS3 project and hit Ctrl+Enter only to be told that the adb.exe could not be found.
A quick change *from* AIR2.6 *to* AIK2.6 solved the problem. (All the other AIR SDKs were named AIKx in the Flash installation directory)
After that – everything worked like a charm :-D
Hi, thanks for a great article. After trying it i am getting the following error…
1172: Definition __AS3__.vec:Vector could not be found.
any thoughts?
I tried this and had the same error message:
1172: Definition __AS3__.vec:Vector could not be found
But that was only when I tested the provided code:
import flash.desktop.NativeApplication;
trace(NativeApplication.nativeApplication.runtimeVersion);
and had export settings for Adobe AIR 2.7
As soon as I changed it to “AIR for iOS” no error appeared anymore. I guess the provided code only works for iOS.
Is this possible?
I’m receiving the same error.
Hi
I have the same Error,
1172: Definition __AS3__.vec:Vector could not be found.
anyone knows a solution?
Thanks
Hi, I am getting the same error as guyB is getting. Could you please help with this?
Oh yeah, I am using Flash CS5 version 11.0.2 with the Adobe Flash Pro CS5 Extension for AIR 2.5 (beta) installed. I followed the steps of your tutorial exactly and it seemed to have worked.
But it just won’t import any ActionScript when I go to test the movie.
I am getting the same error as guyB:
1172: Definition __AS3__.vec:Vector could not be found.
Along with a bunch of other import errors.
when i try to publish for iOS the output file only allow me to save as android app file. Now i cant publish at all.
Thank you so much! This worked great, no more compile-time errors for the CameraRoll’s MediaEvent and MediaPromise.
I would just add that after doing this I’m no longer able to test my apps within Flash as Air (Mobile & Desktop) apps, just in Flash Player. This is inconsequential to me but may be important to others.
I also don’t see iPhone or Android devices in the Adobe Device Manager, but I hadn’t noticed them there before (hadn’t used it yet) it’s possible they were never there in the first place.
Overall, this got me the result I needed.
Just in case this is relevant for anyone else – I installed the 11.01, 11.02 and iOS updates before this.
(http://www.adobe.com/support/flash/downloads.html)
Amnyonne worked out how to overlay AIR 3.0 successfully yet?
Errors:
*** XML Parsing Errors ***
C:\Program Files\Adobe\Adobe Flash CS5\Common\Configuration\Players\\AdobeAIR2_7.xml:
Line 1: Malformed XML element
*** XML Parsing Errors ***
C:\Program Files\Adobe\Adobe Flash CS5\Common\Configuration\Players\\Android.xml:
Line 1: Malformed XML element
Help me to fix it,please…
Also getting the
Scene 1, Layer ‘Layer 1′, Frame 1, Line 1 1172: Definition __AS3__.vec:Vector could not be found.
Missing library ?
Anyone gotta fix ?
I got AIR 3.0 to work in CS5 by following the above instructions to get AIR 2.7 to work. When 3.0 came out I then used the Adobe documented method to replace the updated 2.7 files with the 3.0 files. The link is in this post to the Adobe method for cs5.5 but here it is again:
http://kb2.adobe.com/cps/908/cpsid_90810.html
Make sure that 2.7 is working correctly before you try to upgrade it to 3.0 otherwise you’re wasting your time. Basically all you’re doing is downloading the AIR 3.0 SDK, replacing the 2.7 SDK in the Flash AIR2.6 folder, updating the swc file by replacing it with the new AIR 3.0 swc, and then making the updates to the xml files by changing the player version to 13. AIR 3 runs a bit faster than 2.7 and has a few new features none of which I needed ha ha! But it is faster. Good luck!
For anyone who got the error “1172: Definition __AS3__.vec:Vector could not be found.” or any other type not found, the error was that Flash failed to link to the airglobal.swc, which contains the API definition.
The solution is to add the ‘airglobal.swc’ to the library in the “Actionscript Settings”, and change the swc’s link type to ‘External’
Not sure if AIR 3.0 can be overlay on CS5. Anyone can test it out?
that works now!
thanx!
I have successfully test movie in Flash CS5 with the AIR3.1 Overlaied, the test movie traced the verion is 3.1. However, nothing happen when I click ‘publish’ in the ios settings, no ipa file is generated.
I guess I am close, but still miss something.
There’s a typo in the xml for airiphone and android.
should be
Thanks for this!
Cheers,
George
I tried your method of overlaying air 2.7 and everything works great.The one problem I have is that in the android settings under the permissions tab there are no permissions to select. Has anyone had this problem? everything publishes fine.I just can’t set permissions. How can I set permissions for my apps manually?I see the check box to manually manage permissions but I dont know how to do it and how to make sure the correct xml gets in the apk. Does anyone have a solution to this?