ANEBuilder is a app built with Adobe AIR which allows you to compile ANE files. It is same thing like terminal but easier for your eyes.

The above video shows v1.0 ANEBuilder and as you can see it has changed since then.

AneBuilder_v1.1_screen demoYou select location of the heart components, such as ADT location in some SDK folder, where your project is and so on and you simply compile it.


If you are interested to get hold of the source, head over to BitBucket.

Please report bugs, feature requests in issue tracker

Download ANEBuilder app: ANEBuilder (2652)

Updates in this post:

  1. 10 jan 2013 – v1.2.4 – Bug fix
  2. JAR Compiling

Problems building JAR file in ANEBuilder

After i implemented JAR compiler method in i started to have som weird promblem in Flash Builder.

Here is an example from my current ANE project:

Here is 2 different scenarios:

1) Ready JAR file

One of the options is to manually export the JAR file from Eclipse. I have not found any good flow for this process in others words, the export method is too painful cause of too many steps before i actually got a JAR file. This is more noticeable when needing to export quite many times for trial and error.

Now the JAR file, when exported, works well in ANEBuilder, here we can close this chapter.

2) Compiling JAR from ANEBuilder

As of 1.1.6 version of ANEBuilder i had fixed some bugs in compiler but noticed later that, when selecting Android Project folder and letting to compile the JAR file, something didnt want work out quite well. The above AS3 code, when adding eventlistener to context, i got null error (1009) in Flash Builder, yep the context is null.

So desperately looking for the answer to this problem… i’ve found it. Tho im a bit unsure how well it will work on different Android Projects.

As earlier said, that build script was taken from one of the Lee Brimelows tutorials and modified quite much to suite ANEBuilder. The original line of that JAR builder script looked like following:

I thought this will take the entire content in bin folder and will compile it to ready-to-use JAR file, which it did to 70%, still not quite sure why it did not work in my case. I think it has something to do with how the Android project folder is structured.

Following image is Lee’s original structure, which works for that particular shell script:Lee's original Android project folder structure

And following image illustrates mine:

screener android project


I do not know why they are different, which preferences were used and so on. Maybe it has something to do with me having newer version of Eclipse with newer version of Android SDK.


I hope following piece of code will make it work for everyone who uses ANEBuilder.

Not a big change :) but this worked in my case. So if you are having problems, with context being null in Flash Lib, the first thing you may look into is the and to that piece of code.

Remember, post any issued or suggestions you might have on bitbucket!

Update: If your JAR compiling in ANEBuilder throws 100+ errors, this might be due some extra files in your Android Java project /bin/ folder. Below is a screenshot of my Android Java project folder, this maybe helps out a little.screener android project

ANEBuilder (2652)

ANEBuilder on BitBucket

For you who would love to help out with Windows version

Are you up for the challenge ?

Create a build.bat file, and place it in ANEBuilder source folder. (The same folder where
the ANEBuilder.swf is ^_^).

There are 10 total arguments passed from ANEBuilder to the build script
All these paths are absolute.

  • $1 = ADT – Path to adt.bat for compiling the ANE
  • $2 = JAR_LIB – Path to where Android JAVA project is located, it can be either a JAR file or the Project folder, depending on parameter $10
  • $3 = IOS_LIB – Path to iOS lib file. I believe it is either a .A or .M file
  • $4 = SWC – Path to Flash Library SWC file. This file needs to be unzipped by the build.bat
  • $5 = XML – Path to extension.xml file which is needed for compiling
  • $6 = DESTINATION – Where the $4 (SWC) will be unzipped to and where the .ane will be placed
  • $7 = ANE_NAME – Name for the ANE file
  • $8 = CERT_PATH – Path to the .p12 certificate
  • $9 = CERT_PASS – .p12 certificate password
  • $10 = CREATE_JAR – This is used in OS X, ANEBuilder passes here variable “yes”  for the build script to create a JAR file from selected Android JAVA project. Dunno if that is doable in Windows. You can try :)

You might need to change some code in the file to make it fully working.
I believe when using file.nativePath method, windows has its own way of dealing
with absolute filepaths. Currently all path handlings are suited for MAC.

9 thoughts on “ANEBuilder”

  1. Hi.
    The app doen´t seem to work for me, i get the lower “menu” bar with news, logs and compile but nothing els.

    I´ve tried to reinstall it and I´ve tried earlier versions but still the same result.
    ANEBuilder is a fantastic idea, and i really need it atm so its a bit frustrating that it doesn´t work for me :S

    im on a MAC with OS X 10.8.4 (if that helps any)
    plz if this project is abandoned can anyone direct me to something that does the same?

    1. Id recommennd you to download the sources and compile your own builder, you will in that case see errors in flash and know why it doesnt work out as it should :)

      1. Thx DanelKirch.

        I did what u said and it worked like a sharm.
        I have to say that i love this program.

  2. When I compile I get this log: with the error “unable to build a valid certificate chain”.
    Do you know what this indicates?

    Creating folders in /Users/thijsroumen/Documents/ANEFramework/ANE Builder

    rm: /Users/thijsroumen/Documents/ANEFramework/ANE Builder/ExportBluetoothConnext.ane: No such file or directory

    1. Done

    2. Handling the SWC (copy, unzip, moving the resources)

    Copy XML to new location

    Archive: /Users/thijsroumen/Documents/ANEFramework/ANE Builder/build/ane/VibrationActionScriptLibrary.swc

    inflating: /Users/thijsroumen/Documents/ANEFramework/ANE Builder/build/ane/library.swf

    inflating: /Users/thijsroumen/Documents/ANEFramework/ANE Builder/build/ane/catalog.xml

    2. Done

    3. Compiling the ANE now

    3.1 compiling for iOS

    Unable to build a valid certificate chain for the signer.

    3. Done

    ANE creation complete

    Shell is done with exitCode 0

    1. Did you ever find what causes the “unable to build a valid certificate chain” error?

    2. Im not entirely sure, have not compiled so much for iOS but it could be something with the certificates in the keychain to do, maybe exported in wrong way or something ?

  3. @ECHO OFF


    SET ADT=%1
    SET JAR_LIB=%2
    SET IOS_LIB=%3%
    SET SWC=%4%
    SET XML=%5%
    SET ANE_NAME=%7%.ane
    SET JAR_NAME=%7%.jar

    echo 1. Creating folders in %DESTINATION%

    rmdir /s /q “%DESTINATION%/build/ane”

    mkdir “%DESTINATION%\build\ane”
    mkdir “%DESTINATION%\build\ane\android”
    mkdir “%DESTINATION%\build\ane\ios”
    mkdir “%DESTINATION%\build\ane\default”

    echo 1. Done
    echo 2. Handling the SWC (copy, unzip, moving the resources)

    :: copy extension file to destination
    echo Copy XML to new location
    copy %XML% “%DESTINATION%/build/ane/”

    copy %SWC% “%DESTINATION%/build/ane/”
    “C:\Program Files\7-Zip\7z” e “%DESTINATION%”/build/ane/%NAME%.swc -y
    ping -n 1 -w 1000 > nul

    ::unzip “%DESTINATION”/build/ane/*.swc -d “%DESTINATION”/build/ane

    copy /y “%DESTINATION%/build/ane/library.swf” “%DESTINATION%/build/ane/default/library.swf”
    copy /y “%DESTINATION%/build/ane/default/library.swf” “%DESTINATION%”/build/ane/android/library.swf”
    copy /y “%DESTINATION%”/build/ane/default/library.swf “%DESTINATION%/build/ane/ios/library.swf”

    :: If create_jar is set, user has marked JAR_LIB to be a folder which needs to be compiled to a JAR file
    IF %CREATE_JAR% == 1 (
    echo 2.1 Creating JAR-file
    jar cf “%DESTINATION%/build/ane/android/%JAR_NAME%” -C “%JAR_LIB%/bin/classes/” .
    echo 2.2 re-linking JAR_LIB
    ::we then need to re-link JAR_LIB to the newly created jar file since rest of the script expects that
    ) ELSE IF %JAR_LIB% NEQ “” (
    copy “%JAR_LIB%” “%DESTINATION%/build/ane/android”

    IF  %IOS_LIB% NEQ “” (
    copy “%IOS_LIB% “%DESTINATION%/build/ane/ios”

    echo 2. Done
    echo 3. Compiling the ANE now

    IF %JAR_LIB% NEQ “”  IF %IOS_LIB% != “” (
    echo “3.1 Compiling for Android and iOS”
    “%ADT% -package -storetype PKCS12 -keystore “%CERT_NAME%” -storepass %CERT_PASS% -tsa none -target ane “%DESTINATION%/%ANE_NAME%” “%DESTINATION%/build/ane/extension.xml” -swc “%DESTINATION%/build/ane/*.swc” -platform Android-ARM -C “%DESTINATION%/build/ane/android/” . -platform iPhone-ARM -C “%DESTINATION%/build/ane/ios/” . -platform default -C “%DESTINATION%/build/ane/default/” .
    ) ELSE IF %JAR_LIB% NEQ “” (
    echo 3.1 Compiling for Android
    “%ADT% -package -storetype PKCS12 -keystore “%CERT_NAME%” -storepass %CERT_PASS% -tsa none -target ane “%DESTINATION%/%ANE_NAME%” “%DESTINATION%/build/ane/extension.xml” -swc “%DESTINATION%/build/ane/*.swc” -platform Android-ARM -C “%DESTINATION%/build/ane/android/” .
    ) ELSE IF %IOS_LIB% NEQ “” (
    echo 3.1 compiling for iOS
    “%ADT% -package -storetype PKCS12 -keystore “%CERT_NAME%” -storepass %CERT_PASS% -tsa none -target ane “%DESTINATION%/%ANE_NAME%” “%DESTINATION%/build/ane/extension.xml” -swc “%DESTINATION%/build/ane/*.swc”  -platform iPhone-ARM -C “%DESTINATION%/build/ane/ios/” .

    echo 3. Done
    echo ANE creation complete

Leave a Reply

Your email address will not be published. Required fields are marked *

. no