Flex - Could Not Resolve mx:Application
Tuesday, July 31st, 2007While looking at some Flex Examples for Flex 2 SDK, I ran into the follow error message:
My code looked like this:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">
<mx:Label text="Hello World!"/>
<mx:Label text="Hello World!" fontSize="40"/>
</mx:Application>
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.
Problem Two: It is no longer Macromedia, but Adobe.
The correct code that compiles looks like this:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Label text="Hello World!"/>
<mx:Label text="Hello World!" fontSize="40"/>
</mx:Application>