关于FLex Unit 的 Runtime Exception

 

Problem

: Some of us encounter the Flex unit runtime issue when running the flex unit in the flash builder a few days ago, and it blocked our running the unit test without the ant script.

 

Error: Skin for FlexUnitApplication cannot be found.

at spark.components.supportClasses::SkinnableComponent/attachSkin()[E:/dev/4.0.0/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as:631]

at spark.components.supportClasses::SkinnableComponent/validateSkinChange()[E:/dev/4.0.0/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as:404]

at spark.components.supportClasses::SkinnableComponent/createChildren()[E:/dev/4.0.0/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as:367]

at spark.components::SkinnableContainer/createChildren()[E:/dev/4.0.0/frameworks/projects/spark/src/spark/components/SkinnableContainer.as:821]

at mx.core::UIComponent/initialize()[E:/dev/4.0.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7250]

at spark.components::Application/initialize()[E:/dev/4.0.0/frameworks/projects/spark/src/spark/components/Application.as:916]

at FlexUnitApplication/initialize()

at mx.managers.systemClasses::ChildManager/childAdded()[E:/dev/4.0.0/frameworks/projects/framework/src/mx/managers/systemClasses/ChildManager.as:189]

at mx.managers.systemClasses::ChildManager/initializeTopLevelWindow()[E:/dev/4.0.0/frameworks/projects/framework/src/mx/managers/systemClasses/ChildManager.as:341]

at mx.managers::SystemManager/initializeTopLevelWindow()[E:/dev/4.0.0/frameworks/projects/framework/src/mx/managers/SystemManager.as:2810]

at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::kickOff()[E:/dev/4.0.0/frameworks/projects/framework/src/mx/managers/SystemManager.as:2637]

at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::preloader_completeHandler()[E:/dev/4.0.0/frameworks/projects/framework/src/mx/managers/SystemManager.as:2539]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at mx.preloaders::Preloader/timerHandler()[E:/dev/4.0.0/frameworks/projects/framework/src/mx/preloaders/Preloader.as:515]

at flash.utils::Timer/_timerDispatch()

at flash.utils::Timer/tick()

 

Summary

: It is a issue of the Flex Unit framework, not relative to our test cases. I guess it was caused by the Flash Player version upgrade.

 

Solution

: If you encounter this exception again, you can modify the file FlexUnitApplication.mxml manually as following (which should be created by flex unit and not need to modify before)

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:flexui="flexunit.flexui.*" creationComplete="onCreationComplete()" skinClass="spark.skins.spark.ApplicationSkin" >

 

你可能感兴趣的:(exception,ant,Flex,File,Flash,library)