Reputation: 838
I have an MXML code as
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="library://ns.adobe.com/flex/mx" layout="absolute" backgroundcolor="[#000000, #666666]">
<mx:Label fontSize="40" text="Hello World!"
verticalCenter="0" letterSpacing="2" >
<mx:filters>
<mx:GlowFilter color="#dddddd"/>
</mx:filters>
</mx:Label>
</mx:Application>
I am getting the following error in above MXML code for the Flex project.
Unable to resolve MXML language version. Please specify the language namespace on the root document tag.
Please let me know how shall i correct this error.
Upvotes: 1
Views: 1394
Reputation: 838
On changing the code to one below, it is working perfectly.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="library://ns.adobe.com/flex/mx xmlns:fx="http://ns.adobe.com/mxml/2009" backgroundColor="#000000">
<mx:Label fontSize="40" text="Hello World!" verticalCenter="0" letterSpacing="2" >
<mx:filters>
<mx:GlowFilter color="#dddddd"/>
</mx:filters>
</mx:Label>
</mx:Application>
Upvotes: 2
Reputation: 3951
If you are trying to compile a Flex 3 application with the Flex 4.x compiler, you have change the mx namespace uri and add the "fx" namespace as well. In 3.x projects, i'd recommend to stick to the old 3.x compiler/framework if no migrations are necessary. If you need to use 4.x for whatever reasons, please consult the documentation, since some other modifications are necessary (CSS, compiler options for compatibility).
Upvotes: 3