Had to import some Flex 3 projects to Flash Builder 4 (using it in work now), and everything seemed to go ok. Had copied the Flex 3 SDK from FB3 folder, set it as the default in FB4. Cleaned and ran the project (including RSL library projects) all ok. Then went to Export Release Build and got:
Error – One or more errors were found while trying to build the release version. Unable to export.
The Log file (thanks to doc_180 on Stackoverflow) showed the cause as:
Log file can be found at the equivalent of C:\Documents and Settings\bbishop\Adobe Flash Builder 4\.metadata
Turns out that 3 files are required by Flex 3 SDK to export a release build in Flash Builder 4 where RSL’s (Library projects) are used, and these are missing. Luckily you can copy these from the Flex 4 SDK.
How to implement the solution
- Get a copy of flex-compiler-oem.jar from C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.1.0\lib
- Extract flex-compiler-oem.jar (using Winzip/7 Zip/Winrar), and go to the flex2\tools\oem folder in the extracted files
- Look for the following 3 files:
- Open Winrar (doesnt work for me with Winzip or 7 Zip), and in the AddressBar browse to the flex-compiler-oem.jar file in the Flex 3 SDK – should beequivalent to C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\3.2.0\lib (make a copy first just in case), and open \flex2\tools\oem
- Drag the 3 OEM files over to the \flex2\tools\oem folder in Winrar
That’s it! Close Winrar, and restart Flash Builder 4, should Export a release build ok now:) Nice one.
Note: if using RSL’s you may also need to untick Use local debug runtime shared libraries when debugging from Flex Build Path>Library Path