Emulator not working: "CPU with EPT + UG needed" - android

I'm new to Android Studio, this is my first attempt at running an app. My computer is relatively slow and can't run HAXM so I'm using the ARM instead of the x86 build for the emulator. When I try running it, I get this error:
21:31 Gradle build finished in 15s 887ms
21:31 Emulator: WARNING: init: Missing WGL extension WGL_ARB_create_context
21:31 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.
21:31 Emulator: emulator: WARNING: UpdateCheck: Failure: Error
21:32 Emulator: Process finished with exit code -1073741819 (0xC0000005)
I've tried following instructions from multiple questions on this site, but nothing has worked for me so far. Is there a way to run the emulator or is it just not compatible with my computer? Thanks.

The issues have to do with the specific device you're trying to emulate and the processor you have (intel core 2 or older)
To solve it:
Create a new emulator
Select the device you would like to emulate.
On the next page with the header "System Image" select the tab "other images"
Download and select an image that is listed as armeabi-v7a under the ABI column.
That image should run successfully with your processor.

Related

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:
My SDK Tools:
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.
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
Try installing the Intel x86 Emulator Accelarator (HAXM) and reboot the device. Make sure the emulator is installed properly and reboot Android Studio.

Emulator: emulator: ERROR: x86_64 emulation currently requires hardware acceleration

When I try to run my Hello application , the emulator gives this message. What is the sulotion?
This is the emulator view unfortunately.
Error
31/08/2018
16:32 Gradle sync started
16:32 Project setup started
16:32 Gradle sync finished in 3s 187ms (from cached state)
16:34 IDE and Plugin Updates: Android Studio is ready to update.
16:35 * daemon not running; starting now at tcp:5037
16:35 * daemon started successfully
16:35 Executing tasks: [:app:assembleDebug]
16:35 Emulator: emulator: ERROR: x86_64 emulation currently requires
hardware acceleration!
16:35 Emulator: Process finished with exit code 1
16:35 Gradle build finished in 27s 847ms
Boot into bios and enable VTX. This allows the emulator to use hardware virtualization.
As can be seen in your error-output, running an emulator x86_64 emulation currently requires hardware acceleration!.
What does this error mean/where does it come from?
Emulations run in a virtualized thread of your CPU. A CPU normaly got several physical cores (e.g. in QuadCore CPUs there are 4 physical cores). Virtualization furthermore subdivides these cores into multiple "virtual" cores, meaning it simulates more phyisical cores. You can read more information elsewhere on the internet. Here an extract from geek-university which sums it up pretty short to the point:
CPU virtualization involves a single CPU acting as if it were multiple
separate CPUs. The most common reason for doing this is to run multiple different operating systems on one machine. CPU
virtualization emphasizes performance and runs directly on the
available CPUs whenever possible. The underlying physical resources
are used whenever possible and the virtualization layer runs
instructions only as needed to make virtual machines operate as if
they were running directly on a physical machine.
When many virtual machines are running [...], those [...]
might compete for CPU resources. [...].
Emulators need this environment due to the highlighted reason: Its emulating an entire other system - In your case an Android smartphone.
Solution
Regarding you have an Intel-CPU (AMD should be somehow analog), this should solve your problem.
As general note (this seems to be solved in OPs question since its not in the error log): Make sure Intel x86 Emulator Accelerator (HAXM installer) is installed in your Android SDK (check under Settings -> Appearance & Behavior -> System Settings -> Android SDK -> SDK Tools)
Also as note if somebody wants to check if he has OPs problem coming from a more generic error: Run this command in the command line (needs Android SDK Command-line Tools (latest) to be installed in your SDK):
C:\Android\YourApp> C:\Users\{Username}\AppData\Local\Android\Sdk\emulator\emulator.exe -avd YourAVDName -netspeed full -netdelay none
# The First is your path to your SDKs emulator.exe; use the path you installed the SDK in
# -avd needs a name of an existing AVD you set up in the AVD Manager in Android Studio.
The possible outcome is (if HAXM is already installed and hardware acceleration is your poblem):
emulator: Android emulator version 30.5.3.0 (build_id 7196367)
(CL:N/A) handleCpuAcceleration: feature check for hvf emulator: ERROR:
x86_64 emulation currently requires hardware acceleration! CPU
acceleration status: VT feature disabled in BIOS/UEFI More info on
configuring VM acceleration on Windows:
https://developer.android.com/studio/run/emulator-acceleration#vm-windows
General information on acceleration:
https://developer.android.com/studio/run/emulator-acceleration.
Note that I used an AVD with x86_64 here.
To solve the error you have to restart your PC and enter your BIOS. Search for you CPU-preferences (can often be found in an Advanced-options tab). Somewhere there you'll find a setting called Intel Virtualization Technology which presumably is disabled. enable and restart your computer.
Now your AVD should work fine.

Android studio's emulator doesn't start

7:45 PM 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.
7:45 PM Emulator: emulator: ERROR: x86 emulation currently requires hardware acceleration!
7:45 PM Emulator: CPU acceleration status: Unable to open HAXM device: ERROR_FILE_NOT_FOUND
7:45 PM Emulator: Process finished with exit code 1
Couple things could be going on here. first off Im assuming you're not running it in some virtual environment so few things you could try
The issue might be your CPU hardware, if you have like a core 2 duo processor or something along the low lines like that then it probably does not support Extended Page Tables and Unrestricted guest(thats your EPT + UG error) try running on an API lower than 21 and see if it works you will still get warnings but it should work if that the case
if that isn't the case see if intel virtualization technology is turn on in your bios
try updating your HAXM(hardware accelerated execution manager) on your computer using resource file from the official site(software.intel.com) or whatever it is
or if you don't even have HAXM you can try installing it....
Installation of Intel HAXM consists of two steps. First, you need to download it using SDK manager. Then you need to run intelhaxm-android.exe to install Intel HAXM
also would help to know what kind of processor/cpu you have
Found a few links for the warnings:
For the first warning: Quick Boot not supported
For the others: HAXM errors
Install HAXM from "...sdkroot/ extras / intel" folder .Open the file 'intelhaxm-android.exe'
from this folder.If you don't have it download it.
Reverting back to 7.1 version of HAXM driver worked for me.
the rest are all warnings, so my Emulator showed up finally!!!
Thank you all for guiding.

Android studio could not build and run in my windows 7 OS

I am newbie for android development :)
Install android studio from https://developer.android.com/studio/index.html.
After install i start develop sample application which is available in android studio website, after complete that sample project i try to build and run app. It ask to run a simulator for android phone, i select API27 - Nexus 7.
I am not able to process further it thrown error, after simulator getting crashed. below mentioned that issue.
My PC Intel core 3, is there any configuration is need for boot config itself.
daemon started successfull
Executing tasks:[:app:assembleDebug]
Gradle build finished in 12s 793ms
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.
Emulator: WARNING: init: Missing WGL extension WGL_ARB_create_context
Emulator: glTextImage2D: got err pre:(0x506 internal 0x1908 format 0x1908 type 0x1401
Try to update my drivers. Update Intel drivers with help of.
IntelĀ® Driver & Support Assistant
https://www.intel.com/content/www/us/en/support/detect.html,
First time android simulator loaded slowly after that it loaded properly and faster.

Cordova black screen cold boot

I am trying to run "cordova emulate android" on the default hello cordova project, however when I run it I get an alert saying "cold boot: snapshot doesn't exist", and the emulator screen simply stays black. Here is the terminal output:
BUILD SUCCESSFUL in 3s
47 actionable tasks: 1 executed, 46 up-to-date
Built the following apk(s):
/home/marc/Documents/Tests/cordova/hello/platforms/android/app/build/outputs/apk/debug/app-debug.apk
ANDROID_HOME=/home/marc/Android/Sdk
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
No emulator specified, defaulting to test
Waiting for emulator to start...
emulator: Requested console port 5584: Inferring adb port 5585.
emulator: WARNING: Host CPU is missing the following feature(s) required for x86 emulation: SSSE3
Hardware-accelerated emulation may not work properly!
emulator: WARNING: Not all modern X86 virtualization features supported, which introduces problems with slowdown when running Android on multicore vCPUs. Setting AVD to run with 1 vCPU core only.
warning: host doesn't support requested feature: CPUID.01H:ECX.ssse3 [bit 9]
emulator: WARNING: Not saving state: emulator hasn't finished booting.
How can I fix this?
P.S. I am using andorid api version 26 on Ubuntu 16.04.3 LTS
I answered a question similar to this here. Quickly: The issue might be your CPU hardware. Certain AVD Google API levels do not run well on CPUs that do not support certain features; in your case 'SSSE3'. Try an older AVD Google API level <= 20.

Categories

Resources