1

I'm developing an android application, since there are many assets, the generated apk is near 10M. Now deploying it to a simulator is very slow, often takes me 3 or 4 minutes, which is unacceptable.

I've used Robolectric to test most of the logic, which is very fast. But sometimes I still need to use emulator(e.g. adjust the UI), which waste me a lot of time.

Is there any way to make it fast?

Freewind
  • 193,756
  • 157
  • 432
  • 708

4 Answers4

2

This is my experience, too. Debugging with the software emulator is very slow.

It is much faster to use a real device in debug mode. However, you may run in other limitations

stefan bachert
  • 9,413
  • 4
  • 33
  • 40
  • I used a real device but I don't why sometimes deployment will cause it reboot, which is even slower :( – Freewind Sep 17 '12 at 12:39
  • 1
    This is weird. I don't recall any such reboot, and I think I've done thousands of app deployments during all my debugging sessions...) – Orabîg Sep 17 '12 at 12:41
  • I have different archos here in use. the more powerful one do not show such an effect. one less powerful device make similar problems – stefan bachert Sep 17 '12 at 12:42
2

Well since somebody suggested Android x86 as an alterante testing Emulator, I'll also present my favorite. This might not be an alternative for everyone but for me it's perfect! Use the Bluestacks Player. It runs Android 2.3.4 and is very fluent and fast. Sometimes even faster than a normal device. The only downsize is, that you can just test Apps on the API Level 10 and just on one screen size, but it's perfect just for testing if it's working or not. Just connect the Player with the adb by running

adb connect 127.0.0.1 

After compiling it installs instantly. Very impressive, considering I have a rather average computer hardware(dual core with 4 GB of RAM)

Ahmad
  • 69,608
  • 17
  • 111
  • 137
1

Actually, I absolutly never use the Emulator, which is way too slow in every situations.

I test and debug my apps directly on real devices (and use the ADB screenshot features when I have to pixel-check some screens..)

Hope this helps...

Orabîg
  • 11,718
  • 6
  • 38
  • 58
1

I've found android-x86 image on VirtualBox many times faster for deployment than an emulator running on same machine, sometimes even faster than a USB device.


EDIT

Please use the android image provided by vmlite, not the one provided by android-x86, and refer to this important question: How to change the screen size of vmlite android?

Community
  • 1
  • 1
S.D.
  • 29,290
  • 3
  • 79
  • 130
  • I just installed android-x86, it really runs fast, but... I found it so hard to control the mouse inside the system. Especially for a 800x1280(galaxy note) screen, since my 24' monitor can't display it fully, I had to use right-ctrl to let the mouse out to scroll, which even cost me more time. And I tried to rotate my monitor, but I found I can't control my mouse at all that I can't even unlock the android home screen... What a pity! – Freewind Sep 17 '12 at 14:46
  • I just found android-x86 doesn't work well on slave monitor, so I rotate my primary monitor, and everything works well. Although I still have to use right-ctrl, but it's much easier. It only cost 8s to deployment my app, great! – Freewind Sep 17 '12 at 15:06
  • Sorry, there is still huge problem with android-x86: If I don't use it for a while, e.g 3 minutes, then I can't click anything in the system, and if I deploy my app again, the layout of my app is totally changed. – Freewind Sep 17 '12 at 15:42
  • @Freewind Strange, It works fine on My PC, I can use mouse everywhere like a normal window, and I can re-size the screen just like an ordinary window. – S.D. Sep 17 '12 at 17:13
  • Which android-x86 iso are you using? – Freewind Sep 18 '12 at 11:20
  • @Freewind I'm using a pre-configured VirtualBox image from [VMLite](http://www.vmlite.com/index.php?option=com_content&view=article&id=69&Itemid=178) – S.D. Sep 18 '12 at 12:48
  • Are you using VMLite workstation or VirtualBox? And which version? – Freewind Sep 18 '12 at 15:59
  • @Freewind VirtualBox, the latest one on VirtualBox download site. I also ran default x86 image,works fine, the only thing missing is seamless pointer integration, Something VMLite guys somehow managed to pull off. – S.D. Sep 19 '12 at 07:27
  • I tried virtualbox with VMLite image, the pointer is seamless, but if I don't operate it for several minutes, it will never respond my clicks. I will try it again later. – Freewind Sep 19 '12 at 08:08
  • Yes, vmlite image is so great! It fixes those problems, except one thing: is it able to custom the screen size as 400x800? I can zoom the screen, but can't define one with different w/h ratio. – Freewind Sep 19 '12 at 11:05
  • @Freewind The device screen settings are either built-in or provided as kernel options at boot time, You can have a look at [This Answer](http://stackoverflow.com/a/8273560/1531054) – S.D. Sep 19 '12 at 14:06
  • This works for android-x86, but not for vmlite image. See my another question: http://stackoverflow.com/questions/12493599/how-to-change-the-screen-size-of-vmlite-android – Freewind Sep 20 '12 at 02:06