tags:

views:

473

answers:

2

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.

+2  A: 

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.

Robert Bak
Doh! You're right. Thanks a lot!
drpepper
A: 

Hi I am trying to convert a flex 3 project to flex 4 .but when I replace to it gives following answer:

Could not resolve to a component implementation.

I have included the ur;s and libraries such as :

xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"

Also I have used following to implement swiz framework:

xmlns:control="edu.mizzou.firefly.control." xmlns:view="edu.mizzou.firefly.view." xmlns:core="edu.mizzou.firefly.view.core.*" xmlns:swiz="http://swiz.swizframework.org

Please can any one suggest me where I am going wrong?? Any help would be highly appreciated

Thanks

Akshay

Akshay