开发者

Hello World fails with "Error: Could not resolve <s:Application> to a component implementation"

I'm just starting with Adobe Flex on linux, and can't get the hello world example to work.

My application.mxml file is simply

<?xml version="1.0"?>

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
    xmlns:mx="library://ns.adobe.com/flex/mx" 
    xmlns:s="library://ns.adobe.com/flex/spark">
    <s:layout>
        <s:VerticalLayout/>
    </s:开发者_运维知识库layout>

    <s:Panel title="My Application">
        <s:Label text="Hello World" fontWeight="bold" fontSize="24"/>
    </s:Panel>
</s:Application>

I followed this guide to install Flex on linux (OpenSUSE 11.2), unzipping into /opt/flex.

And yet I get this error upon compiling:

/opt/flex> mxmlc -show-actionscript-warnings=true --strict=true /path/to/application.mxml
Loading configuration file /opt/flex/frameworks/flex-config.xml
/path/to/application.mxml(5): Error: Could not resolve <s:Application> to a component implementation.

    xmlns:s="library://ns.adobe.com/flex/spark">

I've gone through /opt/flex/frameworks/flex-config.xml and added ${flexlib} to all the path references as the post suggested. But still no luck.

Any ideas? Thanks.


Which version of the SDK are you using? s:Application and other spark components were introduced in Flex 4 so this example will not work with Flex 3 sdk.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜