RIA Developer, Flex / Flash, Widgets
Tip of the Day – Building AIR 2 applications with Flash Builder 4
:: Update ::
This process has gotten much easier, you can now use software update to get AIR 2 as well as Flash Player 10.1 in Flash Builder… check out this post.
Adobe AIR 2 and Flash Player 10.1 were released on June 10th, 2010. It’s an exciting time. This weekend I decided to do some development on AIR 2 to try out some of the new features.
On the Adobe AIR Team blog’s post they mention that the free standalone download of the AIR 2 SDK will be available on Tuesday, June 15th… but I wanted to play with the SDK today.
So I went over to the Adobe AIR labs page and downloaded the AIR 2 Release Candidate SDK which is –> here.
You can download the released SDK from –> here
After downloading the Adobe AIR 2 SDK, I followed the directions on the release notes which explained how to overlay the AIR 2 SDK with my current version of Flex 4.
I’m on a mac, here are the commands I used in Terminal:
cd /Applications/Adobe\ Flash\ Builder\ 4/sdks/ ls cp -r 4.0.0 4.0.0AIR2 ls cp ~/Downloads/air2_rc1_sdk_mac_051110.tbz2 4.0.0AIR2 cd 4.0.0AIR2 tar jxvf air2_rc1_sdk_mac_051110.tbz2
I then added a new SDK to the installed SDK’s inside of Flash Builder:

Now, I already had an Adobe AIR application project set up, and I switched over to the new SDK the I installed:

However, when I tried to run my AIR application, I ran into this error:
VerifyError: Error #1014: Class IIMEClient could not be found. at flash.display::MovieClip/nextFrame() at mx.managers::SystemManager/deferredNextFrame()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:267] at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:2460] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.preloaders::Preloader/timerHandler()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\preloaders\Preloader.as:488] at flash.utils::Timer/_timerDispatch() at flash.utils::Timer/tick()
After doing a bit of research I found out that my Adobe AIR project’s application descriptor file wasn’t using the correct namespace for the AIR 2.0 SDK. According to the Adobe AIR 2 Release Notes:
You must update your application descriptor file to the 2.0 namespace in order to access the new AIR 2 APIs and behavior. If your application does not require the new AIR 2 APIs and behavior, you are not required to update the namespace from 1.x based namespace. To update the namespace, change the xmlns attribute in your application descriptor to: http://ns.adobe.com/air/application/2.0
Sure enough, I hadn’t changed my namespace from AIR 1.5.3 to AIR 2.

I made the change in the descriptor file, and now everything works perfectly.

| Print article | This entry was posted by Nate Beck on June 12, 2010 at 4:06 pm, and is filed under Flex, Tip of the day. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |

about 2 months ago
Nice, NativeProcess is awesome with AIR 2 now out and enjoy the sun!
about 2 months ago
Same problem here, same fix. Thank you=)
about 2 months ago
Good tip, well spotted – saved me some hassle figuring it out for myself!
about 2 months ago
Wow, nicely done sir! For those of us who just wanted to play around with Air 2.0′s openWithDefaultApplication, but didn’t want to scour the web for the instructions on updating everything, you saved us all some time! Cheers.
about 2 months ago
Thanks! That helped me too!
I will just add that in order to upgrade flash builder’ SDK, no need to download and install the SDK from Adobe; just use the ‘search for updates’ in the help menu… (duh!… It was not what I did first :-p)
about 2 months ago
Thanks a lot!!!
I was stuck with the Error #1014 for a (very) long time, the answer was so close to me that I can’t saw it
Nicolas
about 2 months ago
Worked for me too. Thanks a mil for sharing!
about 1 month ago
I nearly had a heart attack when I saw this error after flash builder and adobe flash did some updates. Thanks for helping. The error is gone and my app is working as it was before
about 1 month ago
Worked great! Thanks a lot for saving me a bunch of time!