Why is the Android emulator so slow? How can we speed up the Android emulator?

I have got a 2.67 GHz Celeron processor, and 1.21 GB of RAM on a x86 Windows XP Professional machine.

My understanding is that the Android Emulator should start fairly quickly on such a machine, but for me, it does not. I have followed all the instructions in setting up the IDE, SDKs, JDKs and such and have had some success in starting the emulator quickly, but that is very rare. How can I, if possible, fix this problem?

Even if it starts and loads the home screen, it is very sluggish. I have tried the Eclipse IDE in version 3.5 (Galileo) and 3.4 (Ganymede).


Update: The feature described here has been removed from the latest stable versions of Android studio but it is available as "Quick boot" in the canary channel.

快速启动

Android Development Tools (ADT) 9.0.0 (or later) has a feature that allows you to save state of the AVD (emulator), and you can start your emulator instantly. You have to enable this feature while creating a new AVD or you can just create it later by editing the AVD.

Also I have increased the Device RAM Size to 1024 which results in a very fast emulator.

Refer the given below screenshots for more information.

Creating a new AVD with the save snapshot feature.

具有保存快照功能的Android模拟器。

Launching the emulator from the snapshot.

从快照启动模拟器。

And for speeding up your emulator you can refer to Speed up your Android Emulator!:


IMPORTANT NOTE : Please first refer to the Intel list about VT to make sure your CPU supports Intel VT.

HAXM Speeds Up the Slow Android Emulator

HAXM stands for - "Intel Hardware Accelerated Execution Manager"

Currently it supports only Intel® VT (Intel Virtualization Technology).

The Android emulator is based on QEMU. The interface between QEMU and the HAXM driver on the host system is designed to be vendor-agnostic.

HAXM

Steps for Configuring Your Android Development Environment for HAXM

  • Update Eclipse: Make sure your Eclipse installation and the ADT plug-in are fully up-to-date.

  • Update your Android Tools: After each Eclipse plug-in update, it is important to update your Android SDK Tools. To do this, launch the Android SDK Manager and update all the Android SDK components. To take advantage of HAXM, you must be on at least release version 17.

  • 在这里输入图片说明

  • Download the x86 Atom System Images and the Intel Hardware Accelerated Execution Manager Driver . Follow the image below:
  • 在这里输入图片说明

  • Install the HAXM Driver by running "IntelHaxm.exe". It will be located in one of following locations:

  • C:Program FilesAndroidandroid-sdkextrasintelHardware_Accelerated_Execution_Manager

  • C:Users<user>adt-bundle-windows-x86_64sdkextrasintelHardware_Accelerated_Execution_Manager

  • If the installer fails with the message that Intel VT must be turned on, you need to enable this in the BIOS. See the description for how to do this in Enabling Intel VT (Virtualization Technology) .

    安装.exe或.dmg

  • Create a new x86 AVD: Follow the image below:
  • 创建AVD

  • Or as for new SDK,

  • Try Android x86. It's much faster than the Google Android emulator. Follow these steps:

  • Install VirtualBox.
  • Download the ISO file that you need.
  • Create a virtual machine as Linux 2.6/Other Linux, 512 MB RAM, HD 2 GB. Network: PCnet-Fast III, attached to NAT. You can also use a bridged adapter, but you need a DHCP server in your environment.
  • Install Android x86 on the emulator, run it.
  • Press Alt+F1, type netcfg , remember the IP address, press Alt+F7.
  • Run cmd on your Windows XP system, change the directory to your Android tools directory, type adb connect <virtual_machine_IP> .
  • Start Eclipse, open the ADT plugin, find the device, and enjoy!
  • 链接地址: http://www.djcxy.com/p/314.html

    上一篇: 适用于Android UserManager.isUserAGoat()的正确用例?

    下一篇: 为什么Android模拟器如此缓慢? 我们如何加快Android模拟器?