Darlan Araújo dos Santos created FLEX-34752:
-----------------------------------------------

             Summary: Problem with build ant version 4.14. (Error: Incorrect 
number of arguments.  Expected no more than 0.)
                 Key: FLEX-34752
                 URL: https://issues.apache.org/jira/browse/FLEX-34752
             Project: Apache Flex
          Issue Type: Bug
          Components: Ant Tasks
    Affects Versions: Apache Flex 4.14.0
         Environment: OS X Yosemite Version 10.10.2. Apache Flex 4.14 and Adobe 
AIR 16.0
            Reporter: Darlan Araújo dos Santos
            Priority: Critical


Problem in compiling the action script that uses flash.display.NativeMenu using 
flexTask.jar (ant). 
Error:
<code>
Darlans-MacBook-Pro:testeGridComp darlan$ ant
Buildfile: /Users/darlan/Documents/Adobe Flash Builder 
4.6/testeGridComp/build.xml

compile:
     [echo] Compiling build/testeGridComp.swc
    [compc] Loading configuration file /Users/darlan/Documents/Adobe Flash 
Builder 4.6/testeGridComp/compile-config.xml
    [compc] /Users/darlan/Documents/Adobe Flash Builder 
4.6/testeGridComp/src/br/com/test/Test.as(8): col: 53 Error: Incorrect number 
of arguments.  Expected no more than 0.
    [compc] 
    [compc]                     var fileMenu:NativeMenu = new 
NativeMenu("test", false);
    [compc]                                                                     
 ^
    [compc] 

BUILD FAILED
/Users/darlan/Documents/Adobe Flash Builder 4.6/testeGridComp/build.xml:32: 
compc task failed.

Total time: 1 second
</code>

Code:
<code>
package br.com.test
{
        import flash.display.NativeMenu;

        public class Test
        {
                public function createMenu():void {
                        var fileMenu:NativeMenu = new NativeMenu("test", false);
                }
        }
}
</code>

Ant:
<code>
<project name="testeGridComp" default="compile" basedir=".">
        <property file="${basedir}/build.properties"/>
    <property file="${basedir}/env.properties"/>
    <property environment="env"/>
        <target name="compile" description="Compile testeGridComp.swc">
                <echo message="Compiling build/testeGridComp.swc"/>
                <taskdef resource="flexTasks.tasks" 
classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
                <compc fork="true"
                           output="${basedir}/build/testeGridComp.swc">
            <jvmarg line="${compc.jvm.args}"/>
            <load-config filename="${basedir}/compile-config.xml" />
                        <include-sources dir="${basedir}/src" includes="*"/>
            <arg value="+playerglobal.version=${playerglobal.version}" />
            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
                        <arg value="+env.FLEX_HOME=${FLEX_HOME}" />
                </compc>
        </target>
</project>
</code>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to