1 Reply Latest reply on Jun 17, 2011 2:38 AM by flex4

    Error: A file found in a source-path must have the same package structure

    Edward2009 Level 1

      I use Adobe Flex Compiler (mxmlc) Version 4.1.0 build 16032,I have a file,named CustomGraphContainerController.as,it's directory is c:\controllers,and the GCController.as file is under the same directory,CustomGraphContainerController.as file like follows

      package controllers{
      import ui.GraphControlContainer;
      public class CustomGraphContainerController extends GCController {
        public function CustomGraphContainerController(a_graphControlContainer:GraphControlContainer) {
         super(a_graphControlContainer);
        } 
      }

      }

       

      Then I want to use mxmlc command to compile it,like follows:

      C:\>mxmlc c:\controllers\CustomGraphContainerController.as

       

      But it raise compile errors,like follows:


      Loading configuration file C:\sdk\frameworks\flex-config.xml
      C:\controllers\GCController.as: Error: A file found in a source-path must have the same package structure '', as the definition's package, 'controllers'.

       

      I don't know how to compile the as file with package controllers? Where is wrong? How to use mxmlc to compile it?

       

      Thanks