Thursday, July 31, 2008

Flex Builder Cryptic error message

From time to time I find some fun errors in Flex Builder 3. Today for instance we were refactoring our framework project and moving some events and interfaces into our common library. All was going well until I renamed a folder (namespace) within Flex Builder to be singular (i.e. renaming dogs to dog).

Once I did this I got an error saying:
Cannot find source for class dogs.blah Location Unknown
My assumption was that this error was caused by the fact that many classes still referenced the dogs.blah class instead of dog.blah which was it's new name. After diligently fixing all of the references and package declarations within the project the error still occurred. Another developer sat with me and neither of us could figure it out, so I did what I always do in these situations, I Google'd it. And lo and behold I found the answer here.

Basically you need to go to the base directory of your project, open the .flexLibProperties file and remove or correct the bad class references.

This file contains an xml list of all classes to include in your project swc/swf file and for some reason doesn't update properly sometimes. I hope someone reads this and it helps them as much as the other post helped me.

No comments: