With the advent of FlexBuilder3, Adobe has added a very cool ability to be able to access multiple SDKs and also switch between them. This feature would work for SDK versions of Flex2.0.1 onwards. But this has caused quite an interesting issue to surface. Read about it here…
In short, the problem is as below. I have installed FlexBuilder3 and when it opens up for the first time, I enter my license keys (for the builder as well as for charting). The builder by default, when it starts for the first time, uses Flex3-Moxie framework to compile the projects. I make a project with a chart in it and it compiles and the chart shows up without a watermark.
Now I go and change the SDK to Flex201 and recompile and run the app. But this time, I’m stumped to see that the chart appears with a watermark.
The solution though not apparent is a simple one. There are 2 ways to fix it…
1. Solution for Dummies
- Open FlexBuilder
- Right Click your Project and choose Properties
- Choose Flex Compiler -> Configure SDKs -> Choose Flex201 and press OK
- Make sure you have selected “use default sdk” option
- Restart FlexBuilder
- Choose Help -> Manage Flex Licenses and enter your chart license key again. Press OK. You might get an error at this point, but ignore it.
- Re-compile App (better to clean the project) and Enjoy !!!
2. Solution for Geeks (who want to know why it happened !)
The reason for this problem is that FlexBuilder uses a license.properties file found in the frameworks directory of the sdk. The sdk’s pre-configured in your FlexBuilder can be found at <FBInstallationDir>/sdks. So when you give the license key for the first time it writes to the license.properties file of the Flex3SDK and not on the Flex2.0.1 SDK. This is why switching the SDK causes the watermark to appear again.
So, another way of fixing this is to copy the license.properties file from Flex3SDK/frameworks directory to the Flex2.0.1 equivalent. And you are ready to develop in full-fledged versions of Flex2.0.1 and in Flex3.