Skip to main content
Participant
April 3, 2009
Question

Flex SDK Error

  • April 3, 2009
  • 5 replies
  • 3306 views
I'm trying to setup the Flex SDK locally (the bugquash event over the weekend
inspired me) and have got everything installed except I'm getting 2 errors after
I import all of the sample projects:

1012: The static attribute may be used only on definitions inside a class.
airframework/airframework/src/mx/core Version.as line 18 1238554510921 1101

and

1012: The static attribute may be used only on definitions inside a class.
rpc/rpc/src/mx/core Version.as line 17 1238554489765 1100

I should be good to go if I can figure out what I'm doing wrong with these 2
things.

This is all that is in those files, but it is the mx_internal static...line that
is causing the issue (in both projects)

import mx.core.mx_internal;

/**
* @private
* Version string for this class.
*/
mx_internal static const VERSION:String = "3.4.0.0";

Any ideas?
Thanks.
This topic has been closed for replies.

5 replies

Participant
April 3, 2009
Thanks for helping me out with these issues.

I followed your steps, but it still gives me the same errors.

My FLEX_SDK variables (for Java and Flex) are:

c:\flex_sdk (where the trunk is located).

I followed all of the steps in the "Build and Test" page to get to this point :)
April 3, 2009
Probably you dont have correctly configured project references.

Both airframework and rpc depends on framework project.
To configure these dependencies do following steps against (airframweork and rpc):
1. Open project properties
2. Select Flex library Build Path
3. Add framework project on Library path tab
4. Select Project references and check framework project
After you have dependencies set you can rebuild the workspace (Project -> Clean)

Also make sure you have FLEX_SDK variable set as described on opensource wiki.
Participant
April 3, 2009
Thanks guys. That fixed the Version.as problem. I checked the mx package off as I was getting other errors. Now I've unchecked mx, those errors have returned.

These errors occur multiple times. Any ideas of how to fix these. The base64Encoder is definitely in the mx.utils package, but for some reason isn't found (and isn't ctrl-clickable in Flex Builder either)

1046: Type was not found or was not a compile-time constant: Base64Decoder. rpc/rpc/src/mx/rpc/xml SchemaMarshaller.as line 848 1238760371752 2850

1120: Access of undefined property Alert. airframework/airframework/src/mx/core WindowedApplication.as line 2239 1238760350564 2846

1120: Access of undefined property XMLUtil. rpc/rpc/src/mx/rpc/soap AbstractWebService.as line 433 1238760371845 2864

1172: Definition mx.utils:XMLUtil could not be found. rpc/rpc/src/mx/rpc/soap SOAPDecoder.as line 37 1238760371861 2868

1180: Call to a possibly undefined method Base64Encoder. rpc/rpc/src/mx/messaging MessageAgent.as line 900 1238760371830 2857
April 3, 2009
Hi Gareth,

It seems that you have selected Version.as as class to be included in the library. Version.as is not a class and thats why compiler is complaining.

To fix this problem repeat following steps for both projects (framework and airframework):
1. Open project properties (Right click on project name and select "Properties").
2. Select "Flex Library Build Path".
3. Select "Classes" tab.
4. Make sure that only "FrameworkClasses" class is selected. (mx package should not be selected).

Hope this will help you.

Cheers,
Iwo Banas
Participating Frequently
April 3, 2009
<div class=Section1><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Your paths look incorrect.  Airframework should not have another<br />airframework in it, and doing so probably throws off the include of version.as<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Alex Harui<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Flex SDK Developer<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><a href="http://www.adobe.com/"><span style='color:blue'>Adobe<br />Systems Inc.</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Blog: <a href="http://blogs.adobe.com/aharui"><span<br />style='color:blue'>http://blogs.adobe.com/aharui</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><br /><br /><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span<br />style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Gareth Arch<br />[mailto:member@adobeforums.com] <br><br /><b>Sent:</b> Thursday, April 02, 2009 6:27 PM<br><br /><b>To:</b> flexsdk-dev@adobeforums.com<br><br /><b>Subject:</b> Flex SDK Error<o:p></o:p></span></p><br /><br /></div><br /><br /><p class=MsoNormal><o:p> </o:p></p><br /><br /><p class=MsoNormal>A new discussion was started by Gareth Arch in <br><br /><br><br /><b>Developers</b> --<br><br />  Flex SDK Error<br><br /><br><br />I'm trying to setup the Flex SDK locally (the bugquash event over the weekend <br><br />inspired me) and have got everything installed except I'm getting 2 errors<br />after <br><br />I import all of the sample projects: <br><br /><br><br />1012: The static attribute may be used only on definitions inside a class. <br><br />airframework/airframework/src/mx/core Version.as line 18 1238554510921 1101 <br><br /><br><br />and <br><br /><br><br />1012: The static attribute may be used only on definitions inside a class. <br><br />rpc/rpc/src/mx/core Version.as line 17 1238554489765 1100 <br><br /><br><br />I should be good to go if I can figure out what I'm doing wrong with these 2 <br><br />things. <br><br /><br><br />This is all that is in those files, but it is the mx_internal static...line<br />that <br><br />is causing the issue (in both projects) <br><br /><br><br />import mx.core.mx_internal; <br><br /><br><br />/** <o:p></o:p></p><br /><br /><p class=MsoNormal><span style='font-family:Symbol'>&middot;</span>  @private <o:p></o:p></p><br /><br /><p class=MsoNormal><span style='font-family:Symbol'>&middot;</span>  Version string<br />for this class. <o:p></o:p></p><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-family:Symbol'>&middot;</span> <br />/ mx_internal static const VERSION:String = &quot;3.4.0.0&quot;; <br><br /><br><br />Any ideas? <br><br />Thanks. <o:p></o:p></p><br /><br /><div class=MsoNormal><br /><br /><hr size=2 width=200 style='width:150.0pt' align=left><br /><br /></div><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>View/reply at <a<br />href="http://www.adobeforums.com/webx?13@@.59b87f68">Flex SDK Error</a><br><br />Replies by email are OK.<br><br />Use the <a<br />href="http://www.adobeforums.com/webx?280@@.59b87f68!folder=.3c060fa3">unsubscribe</a><br />form to cancel your email subscription.<o:p></o:p></p><br /><br /></div>