0
votes

I have had this issue countless times with my Flex applications. When I export a release build of my application, it is not able to load my initial configuration files and thus my application can't start. Everything works fine if I run the application from bin-debug folder. For this reason, I often have to deploy my bin-debug folder's contents which are much larger in size.

I am loading those configuration files through URLLoader. All paths being loaded at run-time are relative to the SWF's location. I have tried the compiler option -use-network=true but it didn't help. I uploaded bin-release folder to my server and saw the HTTP requests in Firebug but none of those requests is loading the SWZ files or my configuration files. However, when I monitor the requests made by my bin-debug application, it loads all the RSLs (SWF files in bin-debug's case) as well as my config files.

Edit The release version doesn't throw any run-time errors.

2
What are the initial configuration files? Where are they located? Are you sure the config files are in your bin-release folder? The SWZ files are probably already cached by your Flash Player; so that is why you don't see them loaded. - JeffryHouser
Initial configuration files are XML files which contain data used by my application. They are located under bin-release and I give relative paths to them. - Ohas
What is returned from the HTTP Requests? Have you reviewed the packets with something like ServiceCapture or the Flash Builder Network Monitor? - JeffryHouser
XML should be returned if the requests are made to the XML paths but I don't see any requests being made in the release version. I use Firebug to monitor the HTTP requests. - Ohas
Something is amiss if the URL Requests are not being made. I'm not sure what that may be, though. - JeffryHouser

2 Answers

2
votes

I finally found out what the problem was. Exporting release build was removing the [Inject] metadata tags. I added the compiler argument -keep-as3-metadata+=Inject and that fixed it. I found this solution here: https://github.com/robotlegs/robotlegs-framework/wiki/common-problems#wiki-metadata-stripping.

0
votes

I had a similar problem and what helped me was Project->Clean. Just posting in case someone else runs into the problem since it's an easy thing to try.