Update AIR 2 SDK on Flash Builder 4


The easy reliable way to update AIR 2 SDK actually you can grab Flex SDK 4.1: http://renaun.com/blog/2010/06/flex-4-1-includes-flash-player-10-1-and-air-2-0/

Following original post on issues when updating with AIR 2 SDK package directly:

I decided to update AIR 2 on Flash Builder 4 for new features, but got some troubles.

Had a quick look on AIR 2 release notes. Downloaded the new AIR 2 SDK on my iMac and extracted on desktop.

Copy-and-paste on Mac = Fail

For my Mac (snow leopard), the folder to be updated:

  • Mac Flash Builder 4: /Applications/Adobe Flash Builder 4\sdks\4.0.0

In the release notes, Adobe recommend to use command line for Mac OS update, but I think it would be the same to copy/paste with extracted SDK. So I made a backup of 4.0.0, and overwrite directly on top of 4.0.0 folder with new AIR 2 SDK.

Then I opened Flash Builder, well, Flex SDK 4 broken.

Looked into the 4.0.0 folder, surprised to me some original files of Flex SDK 4.0.0 missing after copy-paste.

Then I redo 4.0.0 from backup, this time no longer copy with whole folder but copy files for each folder, except air folders.

Reopened Flash Builder, now I can add Flex SDK 4 successfully.

Snow Leopard File Permission @ Sign with AdobeAIRSDK.tbz2 Package

Whether there’s any difference between copy-and-paste and command line extract? I opened Terminal to see whether something special I could find. What I saw actually, all new files of AIR 2 SDK, had a different file permission flag like this one: -rw-r–r–@

A @ sign!

What’s @ sign means? “The @ sign simply means there is a resource fork added to the file, completely normal for files living in an HFS+ file system under OS X, especially Snow Leopard which even keeps compressed data in resource forks. You go jacking with Snowie’s resource forks and you will get yourself in a heap of trouble.” “This attribute is added so that it can ask for user confirmation the first time the downloaded program is run, to help stop malware. Upon confirmation the attribute should be removed and then the program will run normally.”

I tried again with command line, same as release notes, but, the @sign still exist.

What I can say, @ sign may wouldn’t cause any problem, but who knows, it better to take it out.

So here’s what I did. In Terminal jump to the sdk4.0.0 folder:

  • ls -ald@ *tbz2
  • xattr -d com.apple.quarantine *tbz2
  • ls -al
  • tar jxvf *tbz2

For some reason, the @ sign come with a extended attribute value “com.apple.quarantine”. Once remove this attribute value from the package, after extract all new SDK files no longer have a @ sign.

Don’t forget update project-app.xml

This is a important step but in the release notes, it belongs to “Flash Professional CS4″ section.

The problem is, each AIR project has an application descriptor file app.xml in source root folder, my AIR project created before AIR SDK update, so it was using old namespace, if you run your application for any new class, i.e. ServerSocket, it will give you an error:

VerifyError: Error #1014: Class ServerSocket could not be found.

The reason simply because old AIR project using old SDK namespace, you need update project-app.xml to:

  • <application xmlns=”http://ns.adobe.com/air/application/2.0″>

1 Comment so far »

  1. jana said

    am July 8 2010 @ 4:02 am

    Thank you very much.. This solved by problem which not able to find Server socket.

Comment RSS

Leave a comment

Name: (Required)

eMail: (Required)