Archive for the 'Flex' Category

Flex - Could Not Resolve mx:Application

Tuesday, July 31st, 2007

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:

<?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.

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:

<?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>


Bad Behavior has blocked 1329 access attempts in the last 7 days.