Error migrating Flex 3 to Flex 4

2020-02-12 11:24发布

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

I am having the following error in Flex 4 when launching my application.

What could be the cause of 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 on this one.

Many thanks

2条回答
等我变得足够好
2楼-- · 2020-02-12 12:02

Here is the answer.

The problem was actually occuring when trying to load modules in flex. So basically I included the 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> by their corresponding <fx:....>

And this solved the issue.

查看更多
\"骚年 ilove
3楼-- · 2020-02-12 12:15

Someone having the same problem found out his FLEX_HOME environment Variable was still pointing to the flex 3 sdk.

查看更多
登录 后发表回答