Guide to getting your Corona app to run on the Android emulator

Hi All. After trying on and off several times to get my Corona apps to run on the Android emulator for testing purposes, I was finally able to do it.

Here’s how to test your Corona Android apps on Android JellyBean and other versions. I tested this on a Mac OSX Lion system.

  1. Download the Android SDK http://developer.android.com/sdk/index.html

  2. Launch the Android SDK Manager http://developer.android.com/tools/help/android.html

  3. Install the System images for the Android platforms your want to test on. I recommend 4.1.2, 4.0.3, 4.0, 2.3.3, and 2.2.

  4. Launch the AVD Manager http://developer.android.com/tools/devices/managing-avds.html

  5. Create an AVD for each Android version you want to test on.

  6. For each AVD you create, go into properties, select GPU Emulation and set it to YES. Make sure to press ENTER after changing the value, or it will still be set to NO when you create the AVD. This step is important! Otherwise the application will crash on launch.

  7. Run the AVD of your choosing.

  8. Install your application onto the emulated device using the ADB tool http://developer.android.com/tools/help/adb.html. You may need to restart the ADB tool if it doesn’t detect the device, you can do this by running “./adb kill-server” followed by “./adb start-server”

  9. Run your application! [import]uid: 135827 topic_id: 32386 reply_id: 332386[/import]

What an excellent share! Thanks for writing this, I’m sure it will be very useful to other in the community :slight_smile:

Peach

Edit: Stickied. [import]uid: 52491 topic_id: 32386 reply_id: 128820[/import]

George, thanks very much!! [import]uid: 40033 topic_id: 32386 reply_id: 128821[/import]

Thank you! [import]uid: 147340 topic_id: 32386 reply_id: 130898[/import]

Thank you, I’m looking for it for many days… I will try now! [import]uid: 6732 topic_id: 32386 reply_id: 132344[/import]

Thank you very much… I was trying to find a way to run my app on an android emulator… [import]uid: 186199 topic_id: 32386 reply_id: 137322[/import]

Thanks

For step 2 these were the commands I used.

2.1. Open Terminal and changed folder where I saved the SDK then changed directory to “./sdk/tools/”

2.2. Run command: “./android -v sdk”

 

For step 4 these were the commands I used

 

 

4.1. Open Terminal and changed folder where I saved the SDK then changed directory to “./sdk/tools/”

4.2. Run command: “./android avd”

For step 5 and 6 I set these options for 4.2.2 to try and match a Samsung Galaxy S III.

AVD Name: Android422

Device 4.7" WXGA 1280x720

CPU: ARM v7

HW Keyboard: No

Skin: Yes

Back Camera: Webcam

RAM: 512

VM HEAP: 64

Internal Storage: 512 mb

SD Card: 64mb

Emulation: Use Host GPU

For step 8 I ran these commands in terminal.

cd /Users/simon/AndroidSDK/sdk/platform-tools/

./adb install ./MyAppNameHere.apk

I also setup “.command” shortcuts for these commands on my desktop to easily access these apps.

Thanks george18

I have found solution of my problem by your post. Thanks for sharing this information.

Hi this was very helpful. Thank you!

One question - is there a “terminal” type window we can see any debug info, server responses, error etc.?

Cheers!

Actually a quick Google search and I found this and I can see it now…

“In order to show the tab in Eclipse, select Window -> Show View -> Other… in Eclipse. In the Android section, select the LogCat view which will show log messages for the emulator including your console.log messages under the “Web Console” topic. In order to isolate them click on the green cross to add a Filter, name the filter and assign “Web Console†to the Log Tag. By clicking OK, you’ll show only the Web Console messages including JS errors and your console.log output.”

As you were.  :slight_smile:

We need to declare which version of OpenGL ES your application requires, you should use the android:glEsVersion attribute of the <uses-feature> element. You can also use the <supports-gl-texture> element to declare the GL compression formats that your application uses.

Thank you so much!!..

Excellent sharing…!!! Thanks for the valuable information. I’m sure this will be helpful to everyone in this community.

thank you very much. Your post is very good for me. Thanks.

Hi All. After trying on and off several times to get my Corona apps to run on the Android emulator for testing purposes, I was finally able to do it.

Here’s how to test your Corona Android apps on Android JellyBean and other versions. I tested this on a Mac OSX Lion system.

  1. Download the Android SDK http://developer.android.com/sdk/index.html

  2. Launch the Android SDK Manager http://developer.android.com/tools/help/android

  3. Install the System images for the Android platforms your want to test on. I recommend 4.1.2, 4.0.3, 4.0, 2.3.3, and 2.2.

  4. Launch the AVD Manager http://developer.android.com/tools/devices/managing-avds.html

  5. Create an AVD for each Android version you want to test on.

  6. For each AVD you create, go into properties, select GPU Emulation and set it to YES. Make sure to press ENTER after changing the value, or it will still be set to NO when you create the AVD. This step is important! Otherwise the application will crash on launch.

  7. Run the AVD of your choosing.

  8. Install your application onto the emulated device using the ADB tool http://developer.android.com/tools/help/adb.html. You may need to restart the ADB tool if it doesn’t detect the device, you can do this by running “./adb kill-server” followed by “./adb start-server”

  9. Run your application! [import]uid: 135827 topic_id: 32386 reply_id: 332386[/import]

thanks for your guide. It really helped! Keep on your good job

Thanks for sharing. 

Thanks for giving us chance to experience it.