Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AVD Emulator is not working in Android Studio

While running the emulator on the android studio, my Event Log:

17:11 Executing tasks: [:app:assembleDebug]

17:11 Emulator: Warning: Quick Boot / Snapshots not supported on this machine. A CPU with EPT + UG features is currently needed. We will address this in a future release.

17:11 Emulator: Warning: requested RAM 1536M too high for your system. Reducing to maximum supported size 512M

17:11 Emulator: C:\Users....\AppData\Local\Android\Sdk\emulator\qemu\windows-x86\qemu-system-x86_64.exe: Could not load library WinHvPlatform.dll.

17:11 Emulator: C:\Users....\AppData\Local\Android\Sdk\emulator\qemu\windows-x86\qemu-system-x86_64.exe: failed to initialize WHPX: Function not implemented

17:11 Emulator: Process finished with exit code 0

17:11 Gradle build finished in 2 s 704 ms

All the bold sentence were shown in RED color.

I am getting Notification as:

Emulator: C:\Users....\AppData\Local\Android\Sdk\emulator\qemu\windows-x86\qemu-system-x86_64.exe: failed to initialize WHPX: Function not implemented

My SDK Platform: enter image description here

My SDK Tools: enter image description here

I tried to solve the issue with reference: https://stackoverflow.com/a/52587220/7678788 (I was unable to change it) so, I took help of https://stackoverflow.com/a/52342344/7678788, but this also didn't solve the issue.

My SDK Platform and SDK Tools are of the latest version.

How to fix this issue?


UPDATE

I have also installed the latest Intel x86 Emulator Accelerator (HAXM) and tried to run the emulator, my Event Log:

19:11 Executing tasks: [:app:assembleDebug]

19:11 Emulator: Warning: Quick Boot / Snapshots not supported on this machine. A CPU with EPT + UG features is currently needed. We will address this in a future release.

19:11 Emulator: Warning: requested RAM 1536M too high for your system. Reducing to maximum supported size 512M

19:11 Gradle build finished in 8 s 357 ms

19:11 Emulator: Process finished with exit code 0

All the bold sentence were shown in RED color.

like image 274
Chirag Jain Avatar asked Apr 16 '19 17:04

Chirag Jain


People also ask

Why is my emulator not working Android Studio?

If the Android Emulator does not start properly, this problem is often caused by problems with HAXM. HAXM issues are often the result of conflicts with other virtualization technologies, incorrect settings, or an out-of-date HAXM driver. Try reinstalling the HAXM driver, using the steps detailed in Installing HAXM.

Why AVD Manager is not working?

SDK Build Tools are not installed If it fails then you may have to install it again. You look at the build tab at the bottom of the screen, it will display the error message and option to install the Build tools. Install it and you should be able to see the AVD Manager. Another way is to go to the SDK Manager.

Why has my emulator stopped working?

If the emulator fails to launch due to the error vulkan-1. dll cannot be found , you probably need to update the emulator. To update the emulator in Android Studio, go to Tools > SDK Manager and install the latest stable version of Android platform.


1 Answers

While it's true that the emulator (The emulator ONLY) ask 512mb of ram as minimum, that isn't recomendable since your system, the android studio, and background process also take ram, to run android studio i'll suggest having at least 4gb of ram, but if that isn't posible you should try to have at least arround 768mb of free ram before running the emulator.

For reference there are some OS ram usage(all on x64 OS)
Windows 7 : 460mb - 540mb
Windows 8 : 1.8gb - 2.4gb Windows 10 : 1.5gb - 2.5gb

like image 87
Isacc Rodriguez Avatar answered Oct 20 '22 16:10

Isacc Rodriguez