I've found that there are two cases that files were not copied over:
- Image file included using the following MXML statement:
<mx :Image source="assets/search/oracle_logo.png">
- Dynamically loaded resource bundle files:
_resourceModuleURL = "assets/search/search_" + _locale + ".swf";
_step = new ResourceBundleLoader(_resourceModuleURL);
FlexBuilder should have provided options for developers to pick and choose what files to be packaged into the final AIR application. It does. However, in my case, the above two files are simply not listed in "AIR File Contents" dialog and there is no way to choose them from.
The workaround for this issue is:
- At the last step of "Export Release Build" (i.e., AIR File Contents), click on Cancel instead of Finish. FlexBuilder will copy all files needed (except the ones that are known missing) to the bin-release folder.
- Copy missing files to their corresponding locations.
- Run adt manually to generate the final AIR application:
set flexSdkDir="D:\Program Files\Adobe\Flex Builder 3\sdks\3.1.0"
set JAVA_HOME="C:\Program Files\Java\jre1.6.0_07\bin"
set Path=%Path%;c:\Program Files\Winzip;D:\MKSNT;%flexSdkDir%\bin
set flexWorkDir="D:\myDocuments\Flex Builder 3"
adt -package -storetype pkcs12
-storepass welcome -tsa none Search.air bin-release\Search-app.xml
-C bin-release Search.swf -C src assets