Can I tweak my android emulator to make it fast?

前端 未结 13 1390
星月不相逢
星月不相逢 2020-12-07 09:16

I am using the android emulator to run my programs. But its really slow. It takes around 90 seconds to startup and show the home screen. Can I tweak it so that I can reduce

相关标签:
13条回答
  • 2020-12-07 09:47

    use those 3 options.

    emulator --cpu-delay 0 --no-boot-anim --cache ./cache --avd avd_name

    the first two are obvious. the third one will make the memory of the emulator kind of persistent. you can point it to any file that does not get destroyed by boot (such happens with /tmp) it's like a always-on hibernating device.

    0 讨论(0)
  • 2020-12-07 09:47

    Just enable "Snapshot" checkbox in your AVD Manager. It will save the state of your AVD when you close it. So, once you run the emulator again, that saved state will be loaded. Hence the boot up time of your AVD will be considerably reduced.

    0 讨论(0)
  • 2020-12-07 09:50

    If you absolutely cannot use a physical Android device, what you can do is run the Android OS on Virtualbox, and then get the IP address of the emulated Android. Then you'd connect ADB to the emulator using that IP address. That's the jist of it. I've written a more detailed guide to this approach on my blog. http://www.bobbychanblog.com/2011/07/faster-android-emulator-alternative-using-virtualbox/

    0 讨论(0)
  • 2020-12-07 09:55

    If you have the mobile device with you, it's much quicker (and more reliable) to compile it via USB to the device. It takes around 5 seconds to compile and install on your phone, I never use the emulator anymore - it's just to slow.

    Not only is it slow but anything other than static widgets (animation) will struggle to run on the emulator and you will notice lag.

    0 讨论(0)
  • You need to install Intel HAXM

    • open you SDK and install

    enter image description here

    • Create a new AVD

    enter image description here

    • Now when run it you should get this

    enter image description here

    if not then you will need to install Accelerated Execution Manager

    See this Running the new Intel emulator for Android on how can you do this

    enter image description here

    see how much faster do you get Video

    0 讨论(0)
  • 2020-12-07 10:01

    actually these are all great answers, but have u thought of changing the ram from the default 96mb to something like 512? works for me :)

    0 讨论(0)
提交回复
热议问题