简体   繁体   English

Android 仿真器非常非常慢

[英]Android emulator is very very slow

My laptop: Intel Core 2 Duo CPU, 2GHz, 1GB RAM.我的笔记本电脑:Intel Core 2 Duo CPU,2GHz,1GB RAM。

I created a target with SD Card 512MB, Device RAM size 512, snapshot enabled.我使用 SD 卡 512MB、设备 RAM 大小 512、启用快照创建了一个目标。 I waited for 30 minutes but the emulator doesn't ends up loading .我等了 30 分钟,但模拟器最终没有加载 It keeps showing a flash word "Android" on the black screen.它一直在黑屏上显示 flash 字样“Android”。

Before running the emulator, I closed most other programs.在运行模拟器之前,我关闭了大多数其他程序。

What's wrong with it?它出什么问题了? This is very frustrating.这非常令人沮丧。 :( :(

What is your CPU and RAM usage during startup?启动期间您的 CPU 和 RAM 使用率是多少? Do you have a lot of IO swapping occurring?你有很多 IO 交换发生吗? Considering that Windows needs at least 512 to run right half of the time and Eclipse is a memory hog you probably just need more RAM.考虑到 Windows 至少需要 512 才能运行正确的一半时间,而 Eclipse 是 memory 猪,您可能只需要更多 RAM。

You're assigning the emulated Android instance half of the physical memory on your machine.您在您的机器上分配物理 memory 的一半的模拟 Android 实例。 Get more memory.获取更多 memory。

Emulator is in general very slow, and the higher the OS version on the emulator, the slower it gets.模拟器通常很慢,模拟器上的操作系统版本越高,它变得越慢。 I'm a game developer, and with my AMD Athlon X3 2.90 GHz with 4GB RAM it gives me 5-6 fps.我是一名游戏开发人员,我的 AMD Athlon X3 2.90 GHz 和 4GB RAM 给我 5-6 fps。 I tried to open one of my apps on Honeycomb emulator, and it was really terrible.我试图在 Honeycomb 模拟器上打开我的一个应用程序,这真的很糟糕。 It opened, but I couldn't do anything with it.它打开了,但我什么也做不了。 So the best answer is purchasing a real device.所以最好的答案是购买真正的设备。

It shouldn't take more than 5-10min at most to build the emulator on initial startup.在初始启动时构建模拟器最多不超过 5-10 分钟。 The SD card size has no effect on memory usage, it's not loaded into memory, it just creates a larger image file for the sdcard. SD 卡大小对 memory 的使用没有影响,它不会加载到 memory 中,它只是为 sdcard 创建一个更大的图像文件。 Setting the emulator to have 256mb of ram will help, but in general when I have the same problem I just close down the emulator window and re-start it.将模拟器设置为 256mb 的内存会有所帮助,但一般来说,当我遇到同样的问题时,我只需关闭模拟器 window 并重新启动它。 Sometimes it just gets hung-up on creation and isn't a memory issue (I have 16gb of ram and still have the problem from time to time)有时它只是在创建时挂起,而不是 memory 问题(我有 16gb 的 ram,但有时仍然会出现问题)

I've experienced the same thing and in my case I had to set "Min SDK Version" when creating the project in Eclipse.我经历过同样的事情,就我而言,在 Eclipse 中创建项目时,我必须设置“Min SDK 版本”。 Without this setting the emulator didn't start.如果没有此设置,模拟器将无法启动。

The native Android emulator is really slow.原生的 Android 模拟器真的很慢。 It's much faster if you use Android on a virtual machine.如果在虚拟机上使用 Android 会快得多。 You can follow my detailed guide on setting it up.您可以按照我的详细指南进行设置。 http://www.bobbychanblog.com/2011/07/faster-android-emulator-alternative-using-virtualbox/ http://www.bobbychanblog.com/2011/07/faster-android-emulator-alternative-using-virtualbox/

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. Android Development Tools (ADT) 9.0.0(或更高版本)有一个功能可以让你保存AVD(模拟器)的state,你可以立即启动你的模拟器。 You have to enable this feature while creating a new AVD or you can just create it later by editing the AVD.您必须在创建新 AVD 时启用此功能,或者您可以稍后通过编辑 AVD 来创建它。

Also I have increased the Device RAM Size to 1024 which results in a very fast emulator.此外,我将设备 RAM 大小增加到 1024,从而实现了非常快的仿真器。

Refer the given below screenshots for more information.有关更多信息,请参阅下面给出的屏幕截图。

在此处输入图像描述

在此处输入图像描述

And for speeding up your emulator you can refer to Speed up your Android Emulator::为了加速你的模拟器,你可以参考加速你的 Android Emulator::

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM