Installing the Adobe AIR SDK on a Mac

I recently attempted to install the Adobe AIR SDK on my MacBook Pro so that I could compile AIR applications. While Adobe’s done some great work at developing and exposing their tools early to the public, I could not find a set of instructions that resulted in a working installation.

Luckily, Yahoo! Developer Network co-worker JR Conlin stepped up and helped me fill in a couple blanks. As such, I present my revision to the O’Reilly Adobe Integrated Runtime (AIR) for JavaScript Developers Pocket Guide (by Mike Chambers, Daniel Dura, & Kevin Hoyt)… particularly pages 27 and 28, Setting Up the AIR SDK and Command-LineTools:

There are a number of ways to add the path to the AIR SDK to your system path, depending on which shell you are using, and how you specify user environment variables.

The instructions below show how to modify your path environment variable if you are using the bash shell.

  1. Open the Terminal program (/Applications/Utilities/Terminal)
  2. Make sure you’re in your home directory by typing
    cd

    and pressing enter.

  3. We need to check to see if one of two files are present. Run the following command
    ls -la
  4. Look for a file named either.profile or.bashrc.
  5. If you have neither the .profile or .bashrc file, then create the .profile file with the following command:
    touch .profile
  6. Open the .profile or .bashrc file with a text editor.
  7. Look for a line that looks similar to this:
    export PATH=$PATH:/usr/local/bin
  8. Add the path to the /bindirectory to the end of this line. For example, if /bin is at /airsdk/bin, the export path should look something like this:
    export PATH=$PATH:/usr/local/bin;/airsdk/bin

    making sure to separate the entries with a colon.

  9. If the file is empty, add the following line:
    export PATH=$PATH:/airsdk/bin
  10. Save and close the file.

Insert: Quit Terminal (and other applications), and restart your Mac. (If you don’t restart your Mac, your Terminal application won’t recognize the changes.)

  1. Run the following command to load the new settings source,
    .profile

    (or

    .bashrc

    , if that is the file you edited).

Revise item #11: Run the following command to load the new settings source,

. .profile

(or

. .bashrc

, if that is the file you edited).

  1. You can confirm that the new settings have taken effect by typing
    echo $PATH

    and pressing Enter. Make sure that the

    /bin

    path is included in the output.

  2. In order to test the installation, open a Terminal window and type
    adt

    .

    You should see output similar this:

    Too few arguments.
    Usage: adt -package air_file app_xml [ file_or_dir | -C dir file_or_dir ... ] ...

    meaning that the tools are configured correctly.

If you get an error that the file cannot be found, then check the following things:

  • Make sure the bin and runtime directories are included in the

    directory.

  • Make sure you included the path to
    /bin

    correctly in the PATH environment variable.

  • Make sure you either opened a new Terminal window, or ran source on your configuration file.

If this works for you, too (or, if it does not), drop me a line in the Comments section. I will try to keep this updated as I hear from folks. Having recently spoke at the Atlanta stop of the OnAir tour, I can attest that developers are building exciting things with AIR… hopefully this will help a few others join those legions.



·

24 Comments »

  1. haveboard said,

    August 22, 2007 @ 11:08 pm

    Thank you! http://pownce.com/haveboard/notes/577754/

  2. haveboard said,

    August 22, 2007 @ 10:08 pm

    Thank you! http://pownce.com/haveboard/notes/577754/

  3. Tom said,

    August 23, 2007 @ 11:29 am

    Hey there,

    Thanks for the extra info. I still can’t get this to work thought! No errors are thrown during the steps and when I do and echo $PATH I get,

    MacPro:~ tom$ echo $PATH
    /bin:/sbin:/usr/bin:/usr/sbin:/applications/airsdk/bin

    I’ve got the SDK in /tom/applications/airsdk. When I type adt I get

    MacPro:~ tom$ adt
    -bash: adt: command not found

    Any advice?

    Cheers,
    Tom

  4. Tom said,

    August 23, 2007 @ 10:29 am

    Hey there,

    Thanks for the extra info. I still can’t get this to work thought! No errors are thrown during the steps and when I do and echo $PATH I get,

    MacPro:~ tom$ echo $PATH
    /bin:/sbin:/usr/bin:/usr/sbin:/applications/airsdk/bin

    I’ve got the SDK in /tom/applications/airsdk. When I type adt I get

    MacPro:~ tom$ adt
    -bash: adt: command not found

    Any advice?

    Cheers,
    Tom

  5. jr said,

    August 24, 2007 @ 3:31 pm

    Hey Tom:

    Looks like you don’t have the right path specified in your $PATH

    Try changing “/applications/airsdk/bin” to “/tom/applications/airsdk/bin” and see if that works for you.

  6. jr said,

    August 24, 2007 @ 2:31 pm

    Hey Tom:

    Looks like you don’t have the right path specified in your $PATH

    Try changing “/applications/airsdk/bin” to “/tom/applications/airsdk/bin” and see if that works for you.

  7. kab said,

    September 5, 2007 @ 3:01 pm

    Hey Tom:

    The Unix under the shiny aqua interface of Mac OS X is very Case sensitive. I think your PATH schould by

    /Application/.. instead of /application/…

    I hope it will work now for you.

  8. kab said,

    September 5, 2007 @ 2:01 pm

    Hey Tom:

    The Unix under the shiny aqua interface of Mac OS X is very Case sensitive. I think your PATH schould by

    /Application/.. instead of /application/…

    I hope it will work now for you.

  9. Ed Prue said,

    September 15, 2007 @ 4:51 pm

    I can’t even get the installer to run. I’m using the one from “air_b1_mac_061107.dmg” (currently on the Adobe web site as of 9/15/07.) It just blows up as soon as I double-click it, with “The application quit unexpectedly” dialog. So far, I haven’t been able to find any mentions via Google.

  10. Ed Prue said,

    September 15, 2007 @ 3:51 pm

    I can’t even get the installer to run. I’m using the one from “air_b1_mac_061107.dmg” (currently on the Adobe web site as of 9/15/07.) It just blows up as soon as I double-click it, with “The application quit unexpectedly” dialog. So far, I haven’t been able to find any mentions via Google.

  11. micah said,

    September 20, 2007 @ 9:24 pm

    Sorry, Ed. Don’t have a clue why that’s happening. It runs just fine on my machine.

  12. micah said,

    September 20, 2007 @ 8:24 pm

    Sorry, Ed. Don’t have a clue why that’s happening. It runs just fine on my machine.

  13. Ed Prue said,

    September 22, 2007 @ 1:32 am

    I solved my own problem. Just happened to be at Stacey’s in downtown S.F. on my lunch hour (heh heh – no, I wasn’t just there yesterday and the day before that…) flipping through the new O’Reilly pocket guide on AIR, and I stumbled on the fact that you have to be running OS X 10.4.8 or higher to install AIR. Too bad Adobe doesn’t plainly say so on the download site. Anyway, now I’m breathing in the AIR experience — beauty! Hopefully anyone else out there googling “Mac OS X AIR installer doesn’t work” – will find this now, instead of nothing.

  14. Ed Prue said,

    September 22, 2007 @ 12:32 am

    I solved my own problem. Just happened to be at Stacey’s in downtown S.F. on my lunch hour (heh heh – no, I wasn’t just there yesterday and the day before that…) flipping through the new O’Reilly pocket guide on AIR, and I stumbled on the fact that you have to be running OS X 10.4.8 or higher to install AIR. Too bad Adobe doesn’t plainly say so on the download site. Anyway, now I’m breathing in the AIR experience — beauty! Hopefully anyone else out there googling “Mac OS X AIR installer doesn’t work” – will find this now, instead of nothing.

  15. Robyn Tippins said,

    November 10, 2007 @ 10:53 pm

    I can’t get it to install either. Wanted to run snitter. No way am I going through this many steps for that though. 😉

  16. Robyn Tippins said,

    November 10, 2007 @ 10:53 pm

    I can’t get it to install either. Wanted to run snitter. No way am I going through this many steps for that though. 😉

  17. Chad said,

    December 24, 2007 @ 6:23 pm

    I probably didn’t get as far as everyone else, I’m guessing it’s something minor.

    I downloaded the ebook of the pocket guide to see if there was any additional help there too.

    I’m running leopard. I didn’t have a .profile or a .bashrc file. So I typed touch .profile
    perfect. I open it up in the TextMate and it is entirely BLANK.

    So the step where I have to look for a line that is similar to “export PATH=$PATH:/usr/local/bin” doesn’t apply because I’m looking at an entirely blank file.

    Any ideas?

    Thanks — Chad

  18. Chad said,

    December 24, 2007 @ 6:23 pm

    I probably didn’t get as far as everyone else, I’m guessing it’s something minor.

    I downloaded the ebook of the pocket guide to see if there was any additional help there too.

    I’m running leopard. I didn’t have a .profile or a .bashrc file. So I typed touch .profile
    perfect. I open it up in the TextMate and it is entirely BLANK.

    So the step where I have to look for a line that is similar to “export PATH=$PATH:/usr/local/bin” doesn’t apply because I’m looking at an entirely blank file.

    Any ideas?

    Thanks — Chad

  19. Bob said,

    April 18, 2008 @ 9:49 pm

    Hey All, I had a lot of trouble installing this too.. finally got it to work by adding the full path to my AIRSDK/bin directory. So, I put this:

    export PATH=$PATH:/Users/bob/Applications/AIRSDK/bin

    It worked for me… thought it might be helpful.

    Also, Mike Chambers posted a link(4/17/08) on his blog to an updated edition of Pocket Guide. Check out his blog(www.mikechambers.com).

    Direct Link to pdf:
    http://onair.adobe.com/files/AIRforJSDevPocketG

  20. Bob said,

    April 18, 2008 @ 8:49 pm

    Hey All, I had a lot of trouble installing this too.. finally got it to work by adding the full path to my AIRSDK/bin directory. So, I put this:

    export PATH=$PATH:/Users/bob/Applications/AIRSDK/bin

    It worked for me… thought it might be helpful.

    Also, Mike Chambers posted a link(4/17/08) on his blog to an updated edition of Pocket Guide. Check out his blog(www.mikechambers.com).

    Direct Link to pdf:
    http://onair.adobe.com/files/AIRforJSDevPocketGuide.pdf?sdid=CEYFA

  21. MrBonze said,

    August 28, 2008 @ 12:57 pm

    Thank you! Been Googling for hours trying to find out how to do this! Just a note to avoid confusion that you have to replace the path 'airsdk', with the path where you have the air SDK installed.

  22. Stephen Coley said,

    November 4, 2008 @ 8:01 pm

    I tried setting the path initial, this didn't work, even though I know I set the path correctly. So I thought I would trouble shoot, and just navigate to the /bin from the Terminal. Once I was in the /bin, I “ls -al” to make sure adl and adt were in the directory. Once confirmed, I typed adt… It says the command is not found, so I tried adl, it also said the command was not found. Do you have any idea what my issue could be? I do have the all of the directories included in the download in the same directory as /bin.

  23. That Kid from Omaha said,

    November 4, 2008 @ 10:35 pm

    Hmmm…. sorry, I wish I did, but don't have a clue. You may want to reach out to Mike (from Adobe) over at http://www.mikechambers.com/blog/

    If you find out, please feel free to post back here, in case others are stuck, too.

  24. erik said,

    January 7, 2011 @ 6:06 am

    It appears that most SDK folders have . characters in their
    name to identify their SDK version. If you don’t replace them with
    for instance ‘underscores’ , it simply won’t work.

RSS feed for comments on this post · TrackBack URI

Leave a Comment