Tutorial – AIR Beta SDK with Flex Builder on Linux

Update: An updated tutorial, for AIR 1.5.1 SDK, has been posted at http://blogs.adobe.com/ashutosh/2009/03/flex_builder_linux_with_air_15.html

Some changes are required to get Flex Builder to use the new AIR Beta SDK for Linux. This is a step-by-step guide to get things up and running.
1. Ensure that you have Sun JRE >= 1.5 in your PATH (This can be verified with “java -version”)
2. Install Eclipse (cpp or java) >= 3.3 to $HOME/eclipse
    – Download Eclipse 3.4 from http://www.eclipse.org/downloads/ (if you do not already have Eclipse >= 3.3)
    – cd ~
    – tar zxvf ./eclipse-cpp-ganymede-linux-gtk.tar.gz
    – This extracts eclipse under ~/eclipse
3. Install Flex Builder alpha 4 Eclipse plugin
    – Download the Flex Builder installer from http://labs.adobe.com/downloads/flexbuilder_linux.html and launch it
    – chmod +x ~/flexbuilder_linux_install_a4_081408.bin
    – ~/flexbuilder_linux_install_a4_081408.bin
    – Choose $HOME/eclipse as the “Existing Eclipse Folder”:
    – Choose “Proceed with caution” if prompted
4. Install Flex SDK 3.1
    – Download Flex SDK 3.1 from http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3
       – Choose Build, Adobe Flex SDK dated Aug 15, 2008
    – Unzip it to a new folder (“3.1”) under ~/Adobe_Flex_Builder_Linux/sdks:
    – cd ~/Adobe_Flex_Builder_Linux/sdks
    – mkdir 3.1
    – cd 3.1
    – unzip ~/flex_sdk_3.1.0.2710.zip
5. Install AIR Beta SDK under Flex SDK 3.1
    – Download Adobe AIR SDK from http://labs.adobe.com/downloads/air_linux.html to $HOME
    – Untar it to the folder created above
       – cd ~/Adobe_Flex_Builder_Linux/sdks/3.1
       – tar jxvf ~/adobeair_linux_sdk_b1_091508.tbz2
    – Rename bin/adl to bin/adl_lin and bin/adt to bin/adt_lin (These are what Flex Builder expects)
       – cd bin
       – mv adl adl_lin
       – mv adt adt_lin
6. Set the newly installed SDK as default
    – Launch eclipse
       – ~/eclipse/eclipse
    – Window -> Preferences -> Flex -> Installed Flex SDKs
    – Click on Add
    – Select ~/Adobe_Flex_Builder_Linux/sdks/3.1 as the “Flex SDK location”. Click OK.
       – Choose “Flex 3.1” as the active SDK by selecting its checkbox. Click OK.
We’re done!
To verify that the setup is correct:
1. Create a new AIR application
    – Create a new Flex Builder project (through File -> New)
    – Choose a project name, choose “Desktop application (runs in Adobe AIR)” as the application type. Click Finish.
2. Edit the new application’s .mxml file
    – Change the line:
       <mx:WindowedApplication xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute”>
       <mx:WindowedApplication xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute” title=”{NativeApplication.nativeApplication.runtimeVersion} – {NativeApplication.nativeApplication.runtimePatchLevel}”>
3. Run the application (Ctrl-F11)
4. The application’s window will show up. Check the title of the window. It should be “1 – 6590” (new AIR SDK) and not “1.0 – 20080320” (old AIR SDK) if everything was set up correctly.
The application can be packaged as a .air file through File -> Export -> Flex Builder -> Release Build.

Update: An updated tutorial, for AIR 1.5.1 SDK, has been posted at http://blogs.adobe.com/ashutosh/2009/03/flex_builder_linux_with_air_15.html

7 Responses to Tutorial – AIR Beta SDK with Flex Builder on Linux

  1. Eri says:

    i cannot put Flex builder into my eclipse..,error is cannot show flex in this menu Window -> Preferences -> Flex -> Installed Flex SDKs, i don’t show this menu in my eclipse i’m use Eclipse SDK
    Version: 3.2.2
    please help me

  2. Could you try with a later version of eclipse? Flex Builder requries Eclipse version >= 3.3

  3. Eri says:

    i have been install ecplise 3.4 cause in flex writen 3.3 or higher cause don’t get ecplise in version 3.3 🙁

  4. art says:

    Export Release Build don’t work.

  5. @art
    If you have an older version of the app (esp. made with an older SDK) installed, could you try uninstalling it from the system before installing the new one?

  6. willz says:

    I have tried multiple times to run the flexbuilder_linux_install_a4_081408.bin installer but I continue to run into the same error:
    An internal LaunchAnywhere application error has occured and this application cannot proceed. (LAX)
    Stack Trace:
    java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
    at java.util.Properties.loadConvert(Properties.java:552)
    at java.util.Properties.load0(Properties.java:375)
    at java.util.Properties.load(Properties.java:325)
    at com.zerog.common.java.util.PropertiesUtil.loadProperties(DashoA8113)
    at com.zerog.lax.LAX.(DashoA8113)
    at com.zerog.lax.LAX.main(DashoA8113)

    I’m not sure about this – it seems like you might be missing some Java packages or the version of Java/JRE on your system is old/imcompatible – could you confirm that you have Sun JRE 1.5 or higher?
    This might also help – http://ubuntuforums.org/showthread.php?t=336447
    – Ashutosh

  7. Usiel Urbina says:

    Thanks for your help.
    I wanna to find a tutorial to install Eclipse and Flex into Linux. Finally I found it.
    Just one question: Doesn’t work the visual view of application Flex?

    Flex Builder’s “Design View” is not supported on Linux.
    BTW, Flex Builder Linux can be used with the latest AIR SDK – instructions.
    — Ashutosh