How to compile and install AIR for Android with Flashdevelop

On 10.8.2010 by Antti Lepistö

My Flash CS5 trial just expired so I needed to figure out how to compile my AIR for Android with Flashdevelop. I’ve tried it a couple of times but haven’t been able to make it work. Today I did.

Disclaimer: I take no credit for these instructions. I found them on the Adobe AIR for Android developer prerelease forums. If you end up reading this, you’ve most likely seen them too. However, they were a bit confusing in my opinion and had some misleading typos. Also, I had to make minor changes to be able to compile my project.

I assume you have Android SDK, AIR 2.5 SDK and AIR runtime for Android installed. If not, Lee Brimelow covered this pretty well.

  • Create a new AIR project (AIR AS3 Projector or AIR Flex 3/4 Projector) or use this simple accelerometer project I made.
  • Copy the content from your Air SDK 2.5 folder into your Flex SDK 3.2 (or newer) folder. Accept all overwrites.
  • Check the Flex sdk path in Tools > Program setting > AS3Context > Flex SDK location
  • Set the xmnls property in application.xml : <application xmlns=”http://ns.adobe.com/air/application/2.5″>
  • Change the version property in application.xml : <versionNumber>1.0</versionNumber>
  • Edit CreateCertificate.bat to change the path to Flex SDK
  • Edit CreateCertificate.bat to set your certificate password (default pwd : “fd”)
  • Run CreateCertificate.bat to generate your self-signed certificate
  • Dowload the customized PackageApplication.bat and save it to your project folder
  • Edit this PackageApplication.bat to set the path to Flex SDK and the path to Android SDK (line 8 and 9).
  • Launch your Android emulator or connect your Android phone to the computer (if you want the installation to succeed, the emulator MUST be running or a phone connected)
  • Run PackageApplication.bat, then type your certificate pwd twice (for .air & . apk)
  • You can notice two new folders in your FD project : air & apk, if you look at the Emulator or your phone, the app should be there!

Trackbacks & Pings

Leave a Reply

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