This 2 part ‘how to’ will discuss setting up the Android SDK on a Windows platform, and use Flash CS5 to publish our Air app to an Android emulator (or your device).
First, a brief overview of the steps involved:
- Download and install the Android SDK and setup an Android emulator for testing (Part 1)
- Download and install the Air for Android Runtime and the Flash CS5 Android extension (Part 2)
- Use Flash CS5 to create and publish the application to the emulator or your device (Part 2)
Part 1.
First, we need to head over to http://developer.android.com/sdk/to download the SDK. Once there, click on the SDK download link for the Windows platform.

Once the download is complete, we need to extract the contents of the zip file to a permanent, safe location. You can choose whatever directory you like, but for simples sake i’m going to create a directory called android on the root of my c:\ drive (c:\android) to store the SDK. Using Winrar (or your own favourite zip utility) to open the downloaded zip file, we can drag and drop the android-sdk-windows directory from Winrar straight into the c:\android directory to extract the contents.
Once the extraction is complete, close Winrar and browse to the android-sdk-windows directory (mine would be c:\android\android-sdk-windows) and double click on the SDK Manager.exe file within.
As Adobe Air for Android requires Android 2.2 (Froyo) to run, we are only going to select the 2.2 archive to install – you can safely de-select the older Android platform archives from the list (by double-clicking each one until the icon turns to a red cross) like so:

When you click install the SDK Manager will download the rest of the required files, including any documentation / examples you marked for install. If you have your device to hand and wont be using an emulator, you should select the ‘Usb Driver package’ as well.
Once complete, select the ‘Virtual Devices’ item in the list in the SDK Manager and click ‘New’. In the Create AVD (Android Virtual Device) window, type a name for your emulator, e.g. ‘Froyo_Emulator’ and (the important bit) select Android 2.2 as the target.

You may also specify a virtual SD-Card that the emulator can access if you wish by inserting a value of your choice into the ‘Size’ text box. Under ‘Skin’ I changed the ‘Built in’ option from Default (HVGA) to WVGA800 which will set the screen resolution of the emulator to 480×800 (the same as the HTC Desire and the Nexus One).
Click the ‘Create AVD’ button once done to save the emulator, which will now appear in the list of your currently installed emulators (you can have more than one emulator which is handy if you want to test native applications on older versions of Android or to test your app on different screen resolutions).
Select your newly created emulator from the list and hit start, and then launch. The first launch of your new emulator may take longer while the operating system configures itself. Take the opportunity to browse around the OS and get used to the feel of it. I do find the Android emulator can be quite slow and laggy.
Part 2 coming soon…