Error migrating Flex 3 to Flex 4

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 04:53:29

问题


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


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/7025649/error-migrating-flex-3-to-flex-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!