Thursday, 6 January 2011

Install Air Runtime into the Android SDK Emulator

by Flashopen

After you have everything in their places,
1. Air for Android extension on Flash CS5
2. Android SDK
and you have it run accordingly, you might have run into a draw back that it is not so well documented (by the time of this post). That is, how to install the AIR Runtime.apk on the 'Emulator' in order to run your applications on your computer.

You have created a device (AVD) for Froyo (Android 2.2)

and you have start(ed)/launch(ed) it as well... (just to make sure!).

You are also ready with your application in Flash and checked it for Emulator release in the Air Android Settings. You published it and you have already seen your app beautifully installed on the Emulator, right? Great!

Now, the draw back: if you try to open your app you'll see this:

Haven't you?
You click on the Install button but nothing happens!?
That is because you need to install it manually, that is, to install the Runtime.apk file.

You can find this file in the Flash folder on your computer:

PC Windows: C:\Program Files\Adobe\Adobe Flash CS5\AIK2.5\runtimes\air\android\emulator\Runtime.apk

Mac OSX: (Look in Applications\Adobe Flash CS5 and follow the same path as in Windows)

You may want to copy this file into the platform-tools folder of the SDK to easier the process but you don't really need to.

There we go!

Windows:
1. Go to Start / Run (Win+r), type cmd.


2. In the platform-tools folder select adb.exe and drag it into the prompt-window


3. After space type: -e install -r


4. Select Runtime.apk and drag it into the prompt-window


Do not forget to have the Emulator opened at this stage.


5. Press Enter and wait.
It will take about 20-30 seconds until it gets installed.


You are ready now.
In the Emulator, go back to your application and test it again.


Mac OSX:
1. Open the Terminal in Applications/Utilities


2. Make a shortcut to the folder platform-tools.

Do not forget to have the Emulator opened at this stage.

3. After space type: ./adb -e install -r Runtime.apk


4. Press Return and wait.

You are ready now.
In the Emulator, go back to your application and test it.

Good luck!

3 comments:

  1. I did these steps and when launchecd my app it says you need to update your AIR version.
    When I click update, redirects me to market place and the air page says Installed.

    When i click Installed it pops up a dialog box but emulator is not shown in the device list.

    how to do this? Please help..

    ReplyDelete
  2. I am really thankful of yours for putting this small but very important tutorial. I was searching for this solution for almost 2 days and got nothing, but this has solved my problem in few mins. Once again thanks

    ReplyDelete
  3. Thanks for your great information. We all appreciate your information. Keep posting these kind of nice blogs.
    Air Testing Sherbrooke

    ReplyDelete

Thank you for your comment.