3 Replies Latest reply on Feb 4, 2010 1:53 AM by jake_flex

    Ant build | Core mx classes not located

    nishantkyal Level 1

      Hi,

       

      I'm trying to configure ant build for my flex 3.2 builder project. I'm getting errors as follows

       

      Error: Type was not found or was not a compile-time constant: RadioButton

      Error: Type was not found or was not a compile-time constant: LinkBar

      Error: Type was not found or was not a compile-time constant: EmailValidator

       

      And a couple more type not found errors. All of these errors are for core flex classes. Also, I'm not getting these errors for each and every one of flex classes, only a few. How can I resolve this?

        • 1. Re: Ant build | Core mx classes not located
          jake_flex

          You probably need to add the core libs to your mxmlc tag. The example has this part in the build script

           

            <!-- List of SWC files or directories that contain SWC files. -->
                      <compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
                          <include name="libs" />
                          <include name="../bundles/{locale}" />
                      </compiler.library-path>
          

           

          You only get this error for the classes that you try to use in your code, not for every Flex class.

          • 2. Re: Ant build | Core mx classes not located
            nishantkyal Level 1

            Thanks. What I mean that there are a number of other components too that I'm using out of the framework, but they're not being reported as missing. The tag killed it though, thanks

            • 3. Re: Ant build | Core mx classes not located
              jake_flex Level 2

              nishantkyal wrote:

               

              Thanks. What I mean that there are a number of other components too that I'm using out of the framework, but they're not being reported as missing. The tag killed it though, thanks

              I don't know how the Flex Ant tasks actually work, the documentation is quite poor. When using the mxmlc task, one has to have a source-path tag as

               

              <source-path path-element="${FLEX_HOME}/frameworks" />
              

               

              which includes the framework. Apparently one also needs to include the libs dir with the compiler.library-path as discussed above. What exactly is in the libs is something I don't know.