I have updated android studio to 3.0 through standard update channel. After update am not able to start the emulator.
I have tried the following. But nothing worked.
Restart and reinstall HAXM installer.
Restart and reinstall AVD manager.
Start emulator from terminal.
Change the size of RAM to 2GB.
Graphics to Software GLES 2.0
PFB the logs.
At 4:Run
Error while waiting for device: The emulator process for AVD Nexus_5X_API_25 was killed.
AT Gradle Console:
27/10/17
8:42 PM Gradle sync started
8:42 PM Project setup started
8:42 PM Gradle sync finished in 3s 25ms (from cached state)
8:42 PM adb E 10-27 20:42:34 953 34293 usb_osx.cpp:152] Unable to create an interface plug-in (e00002be)
8:43 PM Executing tasks: [:app:assembleDebug]
8:43 PM Emulator: Failed to open vm 7
8:43 PM Emulator: Failed to create HAX VM
8:43 PM Emulator: No accelerator found.
8:43 PM Emulator: failed to initialize HAX: Invalid argument
8:43 PM Emulator: Process finished with exit code 0
8:43 PM Gradle build finished in 19s 741ms
System Config :
Macbook Pro 2016
OS: High Sierra
Build: 3.0, AI-171.4408382, 201710201707,
AI-171.4408382, JRE 1.8.0_152-release-915-b08x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.13 unknown, screens 1680x1050; Retina
I had the same problem. All I did to solve it was updating Android Emulator and Intel x86 Emulator Accelerator under Android SDK Manager > SDK Tools. It started to work again.
Official Solution from Google issue tracker.
SOLUTION A
HVF Solution: Running the emulator on Canary channel 26.1.x (API 25/26 recommended) with Hypervisor.Framework
I implemented this solution and it worked. I am using emulator now on macOS High Sierra.
A1 - If HAXM installed in Android Studio, uninstall it;
Go to SDK Manager > SDK Tools (or Appearance & Behaviour > System
Settings > Android SDK)
Uncheck Intel x86 Emulator Accelerator (HAXM Installer) and Apply.
This will uninstall HAXM.
A2 - You might need to first install HAXM in order to get HVF to work.
Install standalone Intel HAXM as a regular .dmg install. Download from here: https://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager-intel-haxm
HAXM on OS X keeps on disappearing. For any reason, you can uninstall standalone HAXM installation by
sudo Library/Extensions/intelhaxm.kext/Contents/Resources/uninstall.sh
If above not work.Try
sudo System/Library/Extensions/intelhaxm.kext/Contents/Resources/uninstall.sh
A3 - Check whether your macOS supports Hypervisor.Framework or not:
$ sysctl kern.hv_support
kern.hv_support: 1 (if support =1, if not support = 0) (should
support to implement HVF solution)
A4 - Find the file "advancedFeatures.ini". It may be placed in;
~/.android/advancedFeatures.ini ( Users/<username>/.android/advancedFeatures.ini) or
/Users/<username>/Library/Android/sdk/emulator/lib/advancedFeatures.ini (I found mine here)
A5 - Open "advancedFeatures.ini" with an editor.
Find the line HVF = off. Change off to on; "HVF = on"
A6 - Restart Android Studio if it is open (Restart the computer if necessary). Create and RUN the emulator :) No more HAXM warnings :)
SOLUTION B
I didn't try this solution but several comments claim that it also worked. You can try this also, follow the instructions from here :
https://blog.celogeek.com/201708/672/android-studio-emulator-haxm-on-mac-os-high-serria-10-13/
if solution A and B not Work
enable VTx in your Bios
Related
I'm getting this error:
12:53 PM Emulator: C:\Users\tenni\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: error while loading state for instance 0x0 of device 'goldfish_pipe'
12:53 PM Emulator: deleteSnapshot: for default_boot
12:53 PM Emulator: Process finished with exit code 0
I have looked for similar posts on this website and tried updating HAXM to the latest version, and created a new virtual device, but that has not fixed the problem.
Maybe Android studio is not using the latest HAXM I installed?
I'm very new to using Android studio and developing apps so any help would be appreciated!
EDIT
Here's a picture of the version of my HAXM by going to settings > appearance and behavior > system settings > android sdk > sdk tools
This is a known bug and is fixed in the latest version of android studio.
https://issuetracker.google.com/issues/132481542
You can also try a work around by by changing the cpu core from 4 to 1.
Overview
I went to run my program in Android Studio using an emulator, but after I completed the process, the emulator would not open up. Several errors were shown in the Event Log when I tried to run it.
Errors
7:41 PM Emulator: Incompatible HAX module version 3, requires minimum version 4
7:41 PM Emulator: No accelerator found.
7:41 PM Emulator: failed to initialize HAX: Invalid argument
7:41 PM Emulator: Process finished with exit code 0
Images
There were several errors in the Event Log as shown in the image.
Download a minimum version of 4 (currently, it is 3) or goto:
SDK manager > Extras > Intel x86 emulator accelerator (HAXM installer) and update to the latest version.
This happens because it needs a minimum version of 4 but you already installed version 3 so, updating will solve the issue.
When i am trying to run Android code in Android Studio it shows the following in the event log. But I'm not getting any output and am unable to open the emulator.
Executing tasks: [:app:assembleDebug, :app:assembleDebugAndroidTest]
7:28:43 PM Gradle build finished in 4s 386ms
7:30:24 PM Executing tasks: [:app:assembleDebug]
7:30:27 PM Gradle build finished in 3s 576ms
When I am trying to run from AVD Manager it shows as follows:
Cannot launch AVD in emulator.
Output:
emulator: WARNING: VM heap size set below hardware specified minimum of 384MB
emulator: WARNING: Setting VM heap size to 384MB
emulator: ERROR: x86 emulation currently requires hardware acceleration! Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: Android Emulator requires an Intel processor with VT-x and NX support.
Your CPU: 'AuthenticAMD'
When this type of problem happens, best way is to make sure you have followed below points correctly.
You have proper SDK installed
You have Intel HAXM & virtualization option enabled in your BIOS
Configure emulator correctly, download the Intel X86 Atom system image for better performance.
User arm instead of x86 if you have AMD processor when creating emulator.(In most of case)
When you created your device you should have used arm instead of x86. It must work
I'd recommend using Visual Studios Android Emulator
It is stand-alone, so you dont need Visual Studio to run it, it boots up in seconds, and is more robust then GenyMotions Android Emulator.
Launch your emulator from VS Android emulator, once the OS boots and the homescreen displays run your code and it will give you an option to choose the VS emulator in android studio.
Download latest version of Haxm and enable it in bios (hardware acceleration), on most computers it is basically turned off
Problem:
I'm using only command line tools. AVD just worked fine some time ago. Now with various configurations I get only "Starting emulator for AVD..." which simply closes without any error messages and leaving emulator.exe in Task Manager for eternity.
What I've tried:
Various devices, API's, RAM above and below 768, with/without Host
GPU etc;
Reinstall Java;
Reinstall Android SDK;
Run emulator from command line just launches emulator.exe without any errors;
Delete .android folder in User's folder;
Set ANDROID_SDK_HOME variable;
Run SDK Manager.exe/AVD Manager.exe with/without elevated Admin rights;
verbose key gives me the following log:
emulator:Found AVD name 'jkll'
emulator:Found AVD target architecture: arm
emulator:Auto-config: -engine classic (arm default)
emulator:Looking for emulator-arm to emulate 'arm' CPU
emulator:Probing program: C:\Soft\Android\android-sdk\tools/emulator-arm.exe
emulator:return result: C:\Soft\Android\android-sdk\tools/emulator-arm.exe
emulator:Found target-specific 32-bit emulator binary: C:\Soft\Android\android-sdk\tools/emulator-arm.exe
emulator:Adding library search path: 'C:\Soft\Android\android-sdk\tools/lib'
emulator: Found directory: C:\Soft\Android\android-sdk/add-ons\addon-google_apis-google-17\images\armeabi-v7a\
emulator: Found directory: C:\Soft\Android\android-sdk/add-ons\addon-google_apis-google-17\images\armeabi-v7a\
Configuration I am working on:
Windows 10 x64
Android SDK Manager 25.1.1
Java JDK 8 Update 91
i5 CPU with 24GB of RAM
Any suggestions? TY.
I tried all the mentioned solutions. But strangely, I reduced my windows 10 laptop's resolution (from 3840 x 2160 to 1360 x 768) and it worked.
With your verbose I found you are using arm architecture devices.As you are using i5 processor,Windows10 x64 I would Suggest you to use x86 or x86-64 architecture for your devices for this you have to Install Intel x86 Emulator Accelerator (HAXM) from SDkManager.
Hope this helps let me know.
After changed the CPU of my computer and updated sdk, I encounter this problem too.
Now I temporarily solve the problem emulator-x86 I get an error about missing Qt5Core.dll, Qt5Widgets.dll and Qt5Gui.dl:
copy *.dll files in sdk\tools\lib\qt\lib to sdk\tools where the emulator-x86.exe in.
This question already has answers here:
Error in launching AVD with AMD processor
(19 answers)
Closed 6 years ago.
I am getting this error when i tired launching the emulator. Any suggestions?
Cannot launch AVD in emulator.
Output:
emulator: WARNING: VM heap size set below hardware specified minimum of 128MB
emulator: WARNING: Setting VM heap size to 384MB
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAXM must be updated (version 1.1.4 < 6.0.1).
After downloading the Intel HAXM from the android studio, you need to install it. Run the setup from Users*name*\AppData\Local\Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm-android.exe
Sadly, this can be installed only on computers with Intel CPU's, so you must have an Intel to run the Android Studio emulator.
Have you tried reinstalling Intel HAXM? To do that follow these steps.
1) Open SDK Manager and Download Intel x86 Emulator Accelerator (HAXM installer) if you haven't.
2) Now go to your SDK directory (C:\users\username\AppData\Local\Android\sdk, generally). In this directory Go to extras > intel > Hardware_Accelerated_Execution_Manager and run the file named "intelhaxm-android.exe".
3) Restart Android Studio and then try to start the AVD again.
It might take a minute or 2 to show the emulator window.
See this link
or this (for Windows, see link for Mac/Linux):
Configuring VM Acceleration on Windows
Virtual machine acceleration for Windows requires the installation of the Intel Hardware Accelerated Execution Manager (Intel HAXM). The software requires an Intel CPU with Virtualization Technology (VT) support and one of the following operating systems:
Windows 7 (32/64-bit)
Windows Vista (32/64-bit)
Windows XP (32-bit only)
To install the virtualization driver:
Start the Android SDK Manager, select Extras and then select Intel Hardware Accelerated Execution Manager.
After the download completes, execute /extras/intel/Hardware_Accelerated_Execution_Manager/IntelHAXM.exe.
Follow the on-screen instructions to complete installation.
After installation completes, confirm that the virtualization driver is operating correctly by opening a command prompt window and running the following command:
sc query intelhaxm
You should see a status message including the following information:
SERVICE_NAME: intelhaxm
...
STATE : 4 RUNNING
...
To run an x86-based emulator with VM acceleration:
If you are running the emulator from the command line, just specify an x86-based AVD:
emulator -avd
Note: You must provide an x86-based AVD configuration name, otherwise VM acceleration will not be enabled.
If you are running the emulator from Android Studio, run your Android application with an x86-based AVD:
In Android Studio, click your Android project folder and then select Run > Edit Configurations...
In the left panel of the Run/Debug Configurations dialog, select your Android run configuration or create a new configuration.
Under the Target Device options, select the x86-based AVD you created previously.
Run your Android project using this run configuration.
You can adjust the amount of memory available to the Intel HAXM kernel extension by re-running its installer.
You can stop using the virtualization driver by uninstalling it. Re-run the installer or use the Control Panel to remove the software.
You need to have the latest version on intel haxm driver installed. You seem to have version 1.1.4 and the latest one is 6.0.1
Here is the direct link to download and install https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager
enable VT-x for your system, get the latest version of haxm here https://github.com/intel/haxm/releases/tag/v7.4.1 update and u are good to go.
(Or you can use the SDK manager to install it like the other answer suggests)