0 Replies Latest reply on Jan 31, 2012 2:16 PM by Doron Katz

    Getting ant build error "Unable to locate specified base class 'mx.core.Application' for component c

    Doron Katz

      Hi guys,

       

      I am trying to build using ant a Flex 3.5 app, and I keep on getting the error:

      Unable to locate specified base class 'mx.core.Application' for component class 'main'.

       

      my build.xml file looks something like:

      <project name="ASC App" default="compile flex project">

       

         <!-- load previously defined configuration properties file -->

         <property file="build.properties" />

                                   

         <!-- points to our flexTasks.jar we copied to the libs folder to distribute with the project -->

         <taskdef resource="flexTasks.tasks" classpath="${basedir}/libs/flexTasks.jar"/>

                                   

         <!-- delete and create the DEPLOY dir again -->

         <target name="init">

            <delete dir="${DEPLOY_DIR}" />

            <mkdir dir="${DEPLOY_DIR}" />      

         </target>

                                   

         <!-- Build and output the Main.swf-->

         <target name="compile flex project" depends="init">

            <mxmlc file="src/main.mxml" output="${DEPLOY_DIR}/main.swf">

               <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>

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

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

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

                           <library-path dir="${LIBS_DIR}/AlivePDF/" append="true"/>

                           <library-path dir="${LIBS_DIR}" append="true"/>

               <compiler.debug>false</compiler.debug>    

            </mxmlc>

         </target>

       

      </project>

       

       

      and my build.properties:

       

      # Application name

      APP_NAME=AS App

       

      # SWF file

      APP=main

       

      # Common library

      APP_COMMON=../ASC_common

      FLEX_COMMON=../common

      ALIVE_PDF=../libraries/AlivePDF/SWC/AlivePDF

       

      # change this to your Flex SDK directory path

      FLEX_HOME=/SDKs/flex_sdk_3_4

       

      # this points to your project's src directory

      SRC_DIR =${basedir}/src

       

      # points to the project's libs directory

      LIBS_DIR =${basedir}/libs

       

      # this is the folder we want to publish the swf to

      DEPLOY_DIR = ${basedir}/DEPLOY

       

      Your help would be very much appreciated!