Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How long does the Android Emulator take to start? Do you need to close/start if every time you change Java code?

When developing for Android do you typically need to stop the emulator and restart it every time you make a change to your Java code or is there a faster way? The emulator takes about 1.5 minutes to start for me, is this normal?

like image 636
benstpierre Avatar asked Mar 19 '10 18:03

benstpierre


3 Answers

Yes. Starting an emulator is slow, but you don't need to reboot it usually when you make changes. You can just target the already running emulator, at least in eclipse.

like image 70
jqpubliq Avatar answered Oct 14 '22 01:10

jqpubliq


It is worthwhile to use the "Snapshot" functionality of the emulator. It can be enabled when you create (or you can edit) your AVD image.

This will take a "Snapshot" of the emulator image when you stop running. Then it restarts the emulator to that exact same place.

When using this feature, the emulator start-up time is sped up by a factor if 10+ (I see a 10 sec start-up compared to 90 sec to bring it up from scratch).

It is important to note, that this will maintain "state" of your emulator between runs. This can be useful if you are trying to test a particular scenario. It can be bad if you run your emulator out of memory, then "snapshot" that (at which point, you can always take a fresh snapshot, and start again).

like image 7
Booger Avatar answered Oct 14 '22 00:10

Booger


The emulator take some time to start, depending on the running machine and the amount of programs you are running on the host.

If you installed the eclipse plugin, you don't need to restart the emulator each time: simply hit run in eclipse, and the plugin will take care of making the .apk package, put it in the device and start the activity (if any).

like image 6
lbedogni Avatar answered Oct 14 '22 00:10

lbedogni