Why emulator is very slow in Android Studio?

后端 未结 20 2713
小鲜肉
小鲜肉 2020-11-29 03:01

I just setup Android Studio on my PC, which is new launch to develop Android application.

My problem is that, when I try to run my small app in emulator, it take to

相关标签:
20条回答
  • 2020-11-29 03:07

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

    Android Emulator is very slow on most computers, on that post you can read some suggestions to improve performance of emulator, or use android_x86 virtual machine

    0 讨论(0)
  • 2020-11-29 03:07

    Try increasing your ram of intel HAXM by reinstalling it.. Worked for me.. In my pc HAXM setup's location was here: C-Users-Pc's_name-AppData-Local-Android-sdk-extras-intel-Hardware_Accelerated_Execution_Manager

    0 讨论(0)
  • 2020-11-29 03:08

    For those who enabled HAXM and the emulator still works slow here is what you should do:

    1. If Avast antivirus is running on your computer, it is most likely the culprit.

    as per HAXM Release_Notes.txt (Version 7.5.2):

    • On Windows, Avast Antivirus may interfere with HAXM and cause Android Emulator or QEMU to run very slowly. A workaround is to uncheck "Use nested virtualization where available" in Avast Settings > Troubleshooting.

    So open your Avast dashboard > Menu > Settings > Troubleshooting and disable "Enable hardware-assisted virtualization"

    1. Give a higher priority to your emulator's process in the Task Manager:

      Locate your emulator's process in the Task Manager > Details tab:

      Right-click on it and Set Priority -> Above normal

    Sorry that the screenshot is not in English but you got the point, right? That helped me significantly! I hope it will help you as well.

    Also, one thing as per the Release Notes:

    • On Windows 8, 8.1 and 10, it is recommended to disable Hyper-V from Windows Features in order for the HAXM driver to properly function.

    In my case, I didn't have any "Hyper-V" feature on my Windows 8.1 but you probably should try it, just in case. To locate and disable that feature see this article: https://support.bluestacks.com/hc/en-us/articles/115004254383-How-do-I-disable-Hyper-V-on-Windows-

    0 讨论(0)
  • 2020-11-29 03:10

    This worked for me. My size on disk was just too high for the emulator to run correctly. Wiping the data took it from 4.9 GB to 2.9 GB. Click on the AVD manager at the top right and it will pull up a screen with all your devices. In row with your device the very last icon will be a drop down arrow, click it. Click 'Wipe Data' then 'Cold Boot'

    0 讨论(0)
  • 2020-11-29 03:11

    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.

    enter image description here

    Launching the emulator from the snapshot.

    enter image description here

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

    0 讨论(0)
  • 2020-11-29 03:14

    The Best Solution is to use Android Emulator with Intel Virtualization Technology.

    Now if your system have a Processor that have a feature called as Intel Virtualization Technology, then Intel X86 images will be huge benefit for you. because it supports Intel® Hardware Accelerated Execution Manager (Intel® HAXM).

    To check that your processor support HAXM or not : Click Here

    You need to manually install the Intel HAXM in your system. Follow these steps for that.

    • First of all go to - adt -> extras -> intel -> Hardware_Accelerated_Execution_Manager
    • Make sure that Intel Virtualization is enabled from BIOS Settings.
    • Now install Intel HAXM in your system and select amount of memory(i prefer to set it as default value).
    • After installation create new Android Virtual Device (AVD) which should have a Target of API Level xx
    • Now set the CPU/ABI as Intel Atom(x86).
    • If you are on Windows then do not set RAM value more than 768 MB while setting up an emulator.
    • Run the emulator. It will be blazing fast then ordinary one.

    Hope it will be helpful for you. :) Thanks.

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