0

I created a simple flex application which contains following line of codes



    <?xml version="1.0" encoding="utf-8"?>
    <s:HGroup 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">
    <fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    </s:HGroup>


When I run this application in flex I got the following error on the browser

    

    VerifyError: Error #1014: Class spark.components::HGroup could not be found.

also there is a warning on the my flash builder console which follows

`This compilation unit did not have a factoryClass specified in Frame metadata to load the configured runtime shared libraries. To compile without runtime shared libraries either set the -static-link-runtime-shared-libraries option to true or remove the -runtime-shared-libraries option.`

after that i setted -static-link-runtime-shared-libraries=true option in additional compiler arguments after that the above warning become error which follows

`Unable to locate specified base class 'spark.components.HGroup' for component class 'com.region.IRegion'.`

my flex sdk version is flex 4.6.0 Also I have the same problem in the case of s:Button Can you please suggest a solution for this problem?

4

1 回答 1

0

您的 flex 应用程序不能以 HGroup 为根。它需要是

对于 flex 网络应用程序

<?xml version="1.0" encoding="utf-8"?>
<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">
<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
</s:Application>

对于 AIR 应用程序:

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
                       xmlns:s="library://ns.adobe.com/flex/spark" 
                       xmlns:mx="library://ns.adobe.com/flex/mx">
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
</s:WindowedApplication>
于 2013-07-22T09:24:40.677 回答