I have a Flex 4 project that is organized as a main app project with several related projects that are linked in, along with several libraries that get included (I use granite dataservice and tweener, among others). The project runs fine when I do a normal build, I have deployed the resulting swf independently on a web server and its working fine.
Now, whenever I try to do 'Export release build' from the Project menu, the resulting release build doesnt run at all, and it crashes with weird errors, like for example, it first crashes because of a null reference in the partAdded method in one of the components I created, when I removed that component completely it crashed because of a type coercion error on one of the data service objects, and this goes on with all sorts of errors that never existed in the normal 'debug' version not built with the export option.
So I have two questions:
Thanks a lot.
A release build optimises the compile,(no debugging code etc). The swf will be a little quicker and a lot smaller. If you are getting null pointers and data service issues maybe something in your create order is a bit out. If you have an idea of what the offending component may be see if you can set its creation policy. This would be my first thought the other could possibly be some sort of local versus network issue on the release build.
Thanks for the reply, although I am still a bit confused, all my component projects are library projects so I dont even get the option to 'export the release build' for them so I assume they get included automatically? I also can't see where to set creation policy for any of those files?