July 2014 M T W T F S S « Oct 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Posts in Category "Flex Builder"
When you have problem installing/running FB3:
1. FB 3 does not work with firefox 3. See http://bugs.adobe.com/jira/browse/FB-13064 for details.
2. FB3 does not run in 64-bit eclipse, or a 64 bit JDK (JDK 1.6 on Mac is 64-bit) FB-10052
Workaround: use 32-bit eclipse or JDK.
3. UNC homedrive and homepath leads to win install failure. FB-9038
Workaround: Use a local user account.
When you have problem with FB 3 debugging/tracing:
1. Make sure you have the debug version of flash play 9 installed on the browser. You will not see trace statment if debug player is not installed crrectly.
To do that, request http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15507&sliceId=2 from the browser you use as default browser. (Ie. In the FB, if you have IE set as default browser, then run the url from IE. If the default browser for FB is set to IE, but you request that url from FireFox, that doesn’t help.) Make sure you have “Debug Player: Yes” is displayed.
2. Double check the mm.cfg and make sure it is set correctly. mm.cfg is in different location on different OS. Follow the doc here to config it.
My colleague Nick Watson put the instruction together, I am just posting his work here without changing any words.
· These steps are for silent installations on Windows – InstallAnywhere doesn’t support silent installation fully on OS X.
· There are two installers nested within the Flex Builder win installers, so they must be run in series for a silent operation: first the metainstaller, and then the individual installer (either standalone or plugin).
· One easy way to install silently is with a batchfile, as shown in the example below.
Create a properties file for each installer
· For a standalone installation the properties file must be named standalone.properties
· For a plugin installation the properties file must be named plugin.properties
· To run a standalone installation using the batchfile attached, place the file standalone.properties in the same folder with the batchfile and the installer
· The simple properties file example:
# Player installer choices
Sample batch file for silent installation
REM Place this batchfile in the same folder with the PFTW installer.
copy standalone.properties %TMP%\installprops\standalone.properties
REM Extract the FB archive – match the exe filename below with the actual installer
FLXB_2.0_Win_WWE.exe /s /f%TMP% /a -i silent
Running the batchfile
· Make sure the batchfile is in the same folder as the FB installer, along with the properties file you created earlier
· Simply double-click the batchfile to run it
· Alternatively, you can open a cmd window to the folder that contains the batchfile, and run it by typing “silent” to invoke it
o The batchfile will appear as if it is complete before the installer is really finished
o You’ll know the silent install has really completed when the ColdFusion folder opens at the end.
The switches below are specifically for use with Package from the Web download:
/s tells FB to run silently
/f tells FB where to unpack its archive
/a allows FB to pass arguments to the next installer in the series: the InstallAnywhere metainstaller.
The next set of args are aimed at InstallAnywhere:
-i silent tells InstallAnywhere to run silently, resulting in the default Standalone installation selection in the metainstaler.
1. Install FB 2 on Vista get "Power User permissions required" error, even while logged on as admin
This was an issue in FB2 but it’s fixed in FB 2.0.1. Just in case you encounter this problem, here is a Workaround:
1). Click the OK button in the "Power User permissions required" dialog to cancel & dismiss the installer
2). "Program Compatibility Assistant" dialog will appear
3). Select the first option, "Re-install using recommended settings" to re-launch the installer
For other installation problem, check the following first:
–Check account privilege, including read-write permission
–Check java version on the system. FB install includes a JRE; you don’t have to have JRE/JDK installed previously. However, if you have an existing JRE/JDK which is not a valid version for FB on the system, then it can cause problem during the installation. Use “java -version” command to verify the version of Java your system is using. The installer has to be able to find a valid jre/jdk installation.
–Check Direct X version . If the installation hangs, see http://www.adobe.com/go/badaccab
2. Flex builder silent install
See instruction here
3. xerces conflict when running FB with IBM JVM.
When using FB with WebSphere Development environment or IBM RSA 7.0, xerces conflict may cause the service not start correctly. To use the IBM jvm1.4.2 with the Flex Builder compiler and the Flex command-line compilers, you must ensure that the JVM loads the version of xerces supplied with Flex instead of the one in the IBM JVM. To do this, add the following JVM argument to the FlexBuilder.ini (Eclipse.ini in the plug-in configuration) file:
-Xbootclasspath/a:C:/Program Files/Adobe/Flex Builder 2/Flex SDK 2/lib/xercesImpl.jar
-Xbootclasspath/a:C:\Program Files\Adobe\Flex Builder 2 Plug-in\Flex SDK 2\lib\xercesImpl.jar
4. Install FB 2.0.1 with IBM RSA/
1). FB plugin should be installed on top of the existing RSA/Eclipse configuration.
One potential workaround, for people who have already installed FB ahead of RSA, would be to disable com.adobe.feature.core using Eclipse Configuration Manager before installing RSA, and then re-enable it afterwards.
2). You may see error like the following:
java.lang.IllegalAccessError: cannot access superclass org/apache/xerces/util/XMLAttributesImpl$Attribute from class org/apache/xerces/util/XMLAttributesMMImpl$AttributeMMImpl
See #3 for xerces conflict issue.
RSA is installed as standalone with FB plugin on top of it, then you have to
launch with IBM’s shortcut icon (which uses IBM JVM).
If you install RSA’s plugin and FB plugin on top of Eclips, then you can launch it with either IBM shortcut icon or FB shortcut icon.
4). To make RAD 7.0 work with FB 2.0.1, See
5. Eclipse Help trouble
Sometimes you may see error:”Help cannot be displayed. The embedded application server could not run help web application. Check the log for details.”
This is a log4j conflicting issue. See
6. Location of FB log file
The easiest way to find the log file is from FB Help.
Go to Help–>product details.. –>Configuration details –>view error log
If “view error log” is inactive, that means there is no error log exist. The error log will only be created after FB compiler found error in the code.
Here are the location of my log file on Window:
C:/Documents and Settings//My Documents/Flex Builder 2/.me
/Documents/Flex Builder 2/.metadata/.log
If you don’t see .metadata folder on Mac, you can do the following to show hidden files:
In the Terminal type in:
defaults write com.apple.finder AppleShowAllFiles TRUE
As we know, flex Builder 2 (FB) is an Eclipse based IDE that will make creating/editing/debugging flex code very easy for flex developers. For those developers who come from java background, Eclipse may already be the favorite IDE for coding. For those who are not familiar with Eclipse, it may take some time to get use to it. Here are some tips and tricks for using Eclipse.
1. Keyboard shortcuts: You can get a complete shortcuts list within Flex Builder by pressing CTRL-SHIFT-L, or from menu Help –>key Assist…; or look at the list online here.
Here are my favorite shortcuts:
1). ALT + / ( Word completion) —- You can type the first couple of letters of any variables\function\class name, FB will complete the word for you, reduce typing and typos.
2). Ctrl + Space (content assist) —- When your tag is too long for one line, and you put the code on separate line, the content assist doesn’t seams to come up any more. If you use Ctrl + Space, the content assist will popup again.
3). Ctrl + mouse click on a variable/function/class name —- you may have variable/function/class in the code that is defined in some place else. To look at it, you can hold down the ctrl key, and then use the mouse to point to the name of the variable/function/class name you are interested and click it, this will take you to where it is defined.
2. Running a non-default mxml file in the project from Flex Builder
When a project is created, FB will create a default mxml file as the main application file for you. You can create multiple application files in one project from FB, and FB will add them to the application list for you. However, if you copy an application file (mxml files with mx:Application tags) into the project, and try to run that file from FB, you may find that FB will not execute it. This is because FB only runs the mxml file that has been added into the application list of that project. Since the file you copied is not in the application list, FB does not know about it.
To add application files into the application list, simply to the following:
1). open the Navigator view in FB, and select all the mxml you are going to execute.
2). Right click on the files you just selected, go to “application management” –> “add to application list”.
Now you have added the mxml to the application list, you can run any of those mxml in FB.
3. Error displayed when there is no error in the currently opened code.
Sometimes you may see errors been displayed in the problems view, but you are almost sure that there is no error in the mxml page you are editing. Then where is the error coming from? Well, the problems view display the error not only from the file you currently opened, but also the errors from any file in any opened project. For better management, I would do the following:
1). Close all the projects that you are not using, only open the project you are currently working on. By doing so, you are also reducing the time to starting your FB, as well as reducing memory consuming while running FB.
To close or open a project, right click on the project name from the Navigator view, and click on “close project” or “open project”.
2). When errors displayed in problems view, pay attention to the “Resource” and “In folder” columns, which will tell you the file name and location of the code that contains the errors. If that file with the errors has nothing to do with the file you are currently working on, then you can ignore the errors for the moment, and continue to run the file. Your code should run successfully.
4. Clean up errors in problems view
When errors displayed in problems view, you can double click on an error, and it will take you to the line where the error occurs in the code. After you edited the code, you will have to save the page to make the change effective:
If you turned on “build automatically” (this is on by default), then the error will disappear once you saved the file after edit the error.
If you did not turn on the “build automatically”, the error will not disappear until you execute the page. So you should set “build automatically” on for development.
To do so, go to menu Project — > check “build automatically”
5. clean up project
When you find there are problems in your project, like certain mxml page is not updating the modification, or some asset files are missing, you can correct it by doing “clean” on the project (Project–>clean). Other times a simple “clean” will not do the trick.
For example, you may see FB get closed when you try to open certain mxml in the project. This is mostly caused by the project has been messed up. Other times the project may not work properly because of some user error like deleted html in the bin directory that is needed to run the page. In these cases, it is much easier to clean up the project by recreating it. To do so, follow the steps below:
Right click on the project name you want to recreate from Navigator view, and then select “delete”. On the popup dialog, make sure you checked “do not delete contents”. After the project has been deleted, you can recreate it again. Now the project should be cleaned up, and things should be working properly again.
6. Flex Builder running slow or hang, or get “out of Memory” message
Flex Builder will consuming memory over times, especially when you have a lot of projects created in FB. You can monitor the memory usage of FB from windows task manager. Look at the javaw.exe process, the above mentioned problems usually happens when the memory usage of javaw.exe is too height. You can close and restart the FB to clean up the memory.
By default, FB set the heap size for Java virtual machine in FlexBuilder.ini as following:
If you exceed the maximum value, “OutOfMemory” errors can occur.
If your system has more total memory available, then you can increase the maximum heap size value. The rule of thumb used to be set the maximum heap size no more than half of the total memory available. However, with the new features and settings in the newer version of JDK, there are more factors you need to consider when deciding what is the best maximum heap size you can use. You can consult articles about heap size online.
To change the heap size settings, you can modify them in FlexBuilder.ini under the FB root directory.
If you start FB by command line (or using Eclipse), then you can change them by command line (or FB2 shortcut) such as “C:\Program Files\Adobe\Flex Builder 2 Beta 1\FlexBuilder.exe” -vmargs -Xms256M -Xmx512M
7. NullPointer Exception when open FB
If you leave some files open when you close FB and restart FB later, by default FB will open the files you previously opened. If one of those opened file has been deleted already at this time, then FB will throw NullPointer exception. All you need to do to get rid of the exception is to close that file.
8. Modified asset file does not get updated
Once you have compiled your application page and want to modify some of the asset files that are not embedded, such as modify one of your xml files or adding more image files, you may find that they are not updated after recompilation.
To ensure the assets get updated in FB, make sure you turned on “copy assets” (This is set by default):
Project —> properties—>flex compiler, then make sure you checked “Copy assets not embedded in the built SWF to the output directory”
If for some reason the modified files did not get copied into the output directory (by default it is the bin directory), then you need to copy the modified file into the output directory manually. That will make the update show up when you re-run the application.