performance – How to speed up Android Emulation?-ThrowExceptions

Exception or error:

I’m trying to get started with Android development.

I’m using eclipse on Linux and using a Pentium IV @3.2Gh with 1GB of ram.
I’ve just followed the “hello android” howto, with just one sad result: the virtualization is too slow.

It seems that launching the virtual machine has to be slow, and it will be slow even if I’ll use a better computer.

With slow I mean it takes almost 10 minutes to see “hello android” and if I change it to “hello world” it takes an other 10 minutes…

How can I solve it? Is it possible to make eclipse load again my app in the current and running virtual machine without opening a new one?

How to solve:

As long as you have a compatible AVD running, it shouldn’t try to create a new emulator instance. When you want to re-deploy your app to the emulator, kill the existing one from the Debug perspective, and hit the debug button on the menu bar. It should install and launch the app in the existing instance.

###

Bumping the amount of ram on a honeycomb AVD from 256M to 1GM resulted in huge speedup. It was taking ~1 minute to $ adb install -r foo.apk; now it take 4 seconds. I think the emulator was going into swap!

###

In addition to the other answers: Run the emulator (emulator -avd <avd_name> [-<option> [<value>]] ... [-<qemu args>]) with the option -no-boot-anim. This disables the boot animation during emulator startup.

###

If you have a virtual machine open when you start your program, it should automatically select it as the VM to install and rerun the application.

Leave a Reply

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