Flash Builder 4.5:s:WindowedApplication 未初始化 [英] Flash Builder 4.5: s:WindowedApplication does not initialize
问题描述
这里有一个非常相似的问题,但提供的答案对我不起作用.
There is a really similar question here, but the provided answer does not work for me.
这就是我正在做的:
- 创建一个 Flex (airTest) 项目并使用 4.5 选择桌面作为应用程序类型SKD.
- 向主应用程序添加一个按钮并更改背景颜色.
- 编译项目.我什么也没看到.我必须从任务管理器中杀死 adl.
如果我去编辑 airTest-app.xml 并将可见值从默认值更改为 true,则当我编译时,我会看到具有正确背景颜色集的 chrome.
If I go and edit the airTest-app.xml and change the visible from the default to true, when i compile i get to see the chrome with the correct background color set.
如果我将 WindowedApplication 标记从 <s:WindowedApplication
更改为 <mx:WindowedApplication
,它会正常工作.
If I change the WindowedApplication tag from <s:WindowedApplication
to <mx:WindowedApplication
it works as it should.
代码很简单,但我会粘贴它以防万一:
The code is pretty simple, but I will paste it just in case:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark"
backgroundColor="#ff3366"
creationComplete="_onCerationComplete();">
<fx:Script>
<![CDATA[
/**
* Set up the icon and menus.
**/
private function _onCerationComplete():void {
trace("on creation complete");
}
private function _onButtonInitialize():void
{
trace("Button");
}
]]>
</fx:Script>
<s:Button label="Test" initialize="_onButtonInitialize()"/>
</mx:WindowedApplication>
还有 airTest-app.xml(减去注释和未使用的东西)
And the airTest-app.xml (minus comments and unused stuff )
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/2.6">
<id>airTest</id>
<filename>airTest</filename>
<name>airTest</name>
<versionNumber>0.0.0</versionNumber>
<initialWindow>
<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
<autoOrients>false</autoOrients>
<fullScreen>false</fullScreen>
<visible>true</visible>
</initialWindow>
</application>
推荐答案
我找到了一个 线程 在解决问题的 Adobe 论坛上.
I found a thread on the Adobe Forums that solved the problem.
事实证明有一个文件 (mm.cfg) 以某种方式损坏了.通过删除该文件,一切都按预期进行.
It turns out there is a file (mm.cfg) that gets corrupted some how. By deleting that file, everything works as expected.
在我的 Windows 7 框中,该文件位于:C:\Users{用户名}\mm.cfg
In my Windows 7 box, the file is located at: C:\Users{UsuarName}\mm.cfg
同样的文件让我发疯 不久前出于不同的原因......
That same file got me going nuts for a different reason not that long ago...
这篇关于Flash Builder 4.5:s:WindowedApplication 未初始化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!