Flex – Could Not Resolve mx:Application

Had a problem compiling a Flex 2 SDK example via the command line. I was getting a “Could not resolve mx:Application to a component implementation” message. Turns out the fix was right under my nose, I wasn’t reading the compiler’s error message.

While looking at some Flex Examples for Flex 2 SDK, I ran into the follow error message:

Error: Could not resolve <mx:Application> to a component implementation.

My code looked like this:




Problem One: Use 2006, not 2003.

However, don’t be too quick to read the message and make this simple change. Read it again! It is telling you what to use.

Error: unsupported MXML namespace found (‘http://www.macromedia.com/2003/mxml’). Please use the MXML namespace ‘http://www.adobe.com/2006/mxml’ for MXML 2 source code.

Problem Two: It is no longer Macromedia, but Adobe.

The correct code that compiles looks like this: