Error migrating Flex 3 to Flex 4

I imported the Flex 3 project into Flex 4 and removed all the errors and warnings listed in the Flex 4 problem windows.

I get the following error in Flex 4 when starting the application.

What could be the reason for this?

Error: Compatibility version has already been read. at mx.core::FlexVersion$/set compatibilityVersion()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\FlexVersion.as:254] at mx.core::FlexVersion$/set compatibilityVersionString()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\FlexVersion.as:301] at _Screen1Module_mx_core_FlexModuleFactory() 

Experts, please help me with this.

Thank you very much

+4
source share
2 answers

Here's the answer.

The problem occurred while trying to load modules in flex. So basically I included namespaces

 xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" 

and also replaced <mx:Component> , <mx:Style> with their corresponding <fx:....>

And that solved the problem.

+4
source

Someone who has the same problem discovered his FLEX_HOME environment, the variable was still pointing to flex 3 sdk.

+1
source

All Articles