Appendix E. The Android Emulator: Speeding Things Up
Ever felt like you were spending all your time waiting for the emulator? There’s no doubt that using the Android emulator is useful. It allows you to see how your app will run on devices other than the physical ones you have access to. But at times it can feel a little...sluggish. In this appendix, we’ll explain why the emulator can seem slow. Even better, we’ll give you a few tips we’ve learned for speeding it up.
Why the emulator is so slow
When you’re writing Android apps, you’ll spend a lot of time waiting for the Android emulator to start up or deploy your code. Why is that? Why is the Android emulator so sloooooow? If you’ve ever written iPhone code, you know how fast the iPhone simulator is. If it’s possible for the iPhone, then why not for Android?
There’s a clue in the names: the iPhone simulator and the Android emulator.
The iPhone simulator simulates a device running the iOS operating system. All of the code for iOS is compiled to run natively on the Mac and the iPhone simulator runs at Mac-native speed. That means it can simulate an iPhone boot-up in just a few seconds.
The Android emulator works in a completely different way. It uses an open source application called QEMU (or Quick Emulator) to emulate the entire Android hardware device. It runs code that interprets machine code that’s intended to be run by the device’s ...
Get Head First Android Development, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.