nwebb

Flex, Flash, AIR

Upgrading SDK When Using FlexBuilder SDK In Eclipse

I’m using FlexBuilder as an Eclipse plugin and I wanted to update the SDK from 3.0 to 3.3. Should be a 5 minute job right ;)

It actually turned out to be more fiddly than it should have been; In part because the links on the Adobe site appear to have changed recently (so I couldn’t find the files that other bloggers had pointed to) but also, I simply didn’t find all the steps explained clearly on the Adobe site, so here is a quick run down that may help you:

1) First off you will need to download the updated Flex SDK. There are various versions of the SDK that you can download depending on whether you want stability or the most up-to-date code (stable builds vs nightly builds) but for this post I’ll assume you just want to update to the latest stable build (which at the time of writing is 3.3)

2) If you just update the SDK and are using visualisation components in your project (such as charting components) then you will see a bunch of errors when you try to compile; This is because these components are not included in the SDK. You need to get the Data Visualisation Components SDK too.

Once you have downloaded both zips, you’ll want to first unzip the Flex SDK (i.e. extract the folder to a location such as your desktop) and second, unzip the datavisulaization_sdk.zip in to the Flex SDK folder.

Just in case I lost you on the last part, I’m on a Windows machine (using jzip – an excellent altenative to Winzip) and I can merge the two downloads by right-clicking on the zip and doing something like this (should be an almost identical process regardless of which zip utility you are using):


extracting using jzip


I choose to extract the datavisualization_sdk.zip in to my Flex SDK folder, and the files are effectively merged.

Once I merged the two, I then moved the entire folder to C:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks, the default location for FlexBuilder plugin SDKS on my Windows machine (this location was automatically set up for me when I initially installed the FlexBuilder SDK)

3) The final piece of the puzzle for me was to stop an error from occurring which was preventing me from viewing MXML files in Design View after I had updated to the latest SDK. When I tried to view an MXML file in Design View I got the following error: This component is based on Application, which is not a visual component. Switch to source mode to edit it. The technote relating to this error can be found here and you’ll need to download the latest Flex Builder Update if you encounter this error and need to fix it.

That should be all of the downloads you’ll need. Now we need to set everything up.

Ensure Eclipse/FB is closed, then install the FlexBuilder update. When that’s completed you need to associate the new SDK (i.e. the merged SDKs you downloaded earlier) with FlexBuilder. To do this, open up Eclipse and choose Window -> Preferences from the menu. Then choose Flex -> Installed Flex SDKs as shown in the image below:

preferences for sdk install

Click the “Add” button, select the folder we ‘created’ earlier (if you’re on a windows machine it will be in the location specified earlier, i.e. C:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks), give it a name for general reference, and press “OK”. The new SDK should now appear in the list of SDKs. You can now tick the checkbox next to the new SDK if you want it to be the default for new projects.

In order to update one of your current project to use the new SDK, right-click the main project folder (in the Flex Navigator panel) for the project you wish to target, then right-click and choose Properties -> Flex Compiler. The new SDK should be showing in the list of SDKs (see the combo at the top of this screen). Choose the new SDK and voila – your project should be using the updated SDK.

3 comments

3 Comments so far

  1. Edlueze June 9th, 2009 7:35 am

    Just wanted to thank you for spending the time to write out a very clear set of instructions for dummies – with pictures no less! This is exactly what I was looking for! And judging by the order I found this article in Adobe Flex’s search results (you were #6 for the search term “install SDK Eclipse”) a lot of other people have probably been looking for the same thing.

  2. Joeflash June 10th, 2009 7:52 am

    FYI, the bug issue is listed here: http://bugs.adobe.com/jira/browse/FB-16050

    It happens for the standalone Flex Builder as well, not just the plugin. And yes, it has been fixed in Flex Builder 3.0.2

  3. Jackson March 1st, 2010 12:00 am

    For those looking for Mac, 3.0.2, why FB might not be working, see the following if you do not have FlexBuilder 3 installed in the default location. This turned out to be my problem.

    http://kb2.adobe.com/cps/407/kb407675.html

Leave a reply

Bad Behavior has blocked 517 access attempts in the last 7 days.