Skip to main content
Participant
May 9, 2013
Question

Compilation of adobe air app that uses ANE fails while using the flex ant tasks.

  • May 9, 2013
  • 2 replies
  • 1503 views

The resolution seems to be a hack - which when you rename .ane files to .swc, it works.

I came across this workaround here: http://stackoverflow.com/questions/11112705/using-ant-mxmlc-task-with-native-extension?rq=1

<mxmlc file="${app.root}/app.as" 

               output="${output.dir}/app.swf"

               allow-source-path-overlap="true"

               debug="false"

               actionscript-file-encoding="UTF-8"

               swf-version="19" >

            <load-config filename="${framework.root}/air-config.xml"/>

            <source-path path-element="${framework.root}"/>

            <source-path path-element="src"/>

            <source-path path-element="other"/>

            <compiler.library-path dir="libs" append="true">

                <include name="**/*.swc"/>

            </compiler.library-path>

            <!-- THIS DOES NOT WORK -->

            <compiler.external-library-path dir="nativeExtension" append="true">

                <include name="**/*.ane"/>

            </compiler.external-library-path>

            

        </mxmlc>

However, if I rename all the .ane files in the nativeExtension directory to .swc the following change works..

            <!-- THIS WORKS -->

            <compiler.external-library-path dir="nativeExtension" append="true">

                <include name="**/*.swc"/>

            </compiler.external-library-path>

Has this issue been addressed?

I'm using the following:

- Adobe AIR SDK & Compiler (version 3.7) for Mac OS X

- ActionScript Compiler 2.0

- Apache Ant wrapper located in "AIRSDK_Compiler/ant/lib/flexTasks.jar"

Let me know if any other details will be helpful.

This topic has been closed for replies.

2 replies

Known Participant
May 24, 2013

I'm using something like this in my build.xml (inapp.purchase.flash.swc is the flash wrapper for the ANE):

            <external-library-path dir="${basedir}/extensions/inapp.purchase/inapp.purchase.flash/bin" append="true">

                <include name="inapp.purchase.flash.swc" />

            </external-library-path>

I don't think you need ANE when building swf component of your app. ANE is only required for packaging. By linking with external inapp.purchase.flash.swc you're just telling action script compiler that above symbols will be defined later (in ANE).

Participant
May 23, 2013

I too would like to know Adobe's response to this.