Update to Android SDK Tools 23.0.5 and avd doesn't start - adt

I am running on Windows 8.1 x64, developing Android apps using ADT Bundle. Previously (before updating the Android SDK Tools) the AVD was working very correctly and after the update, it says the following error while starting the AVD
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAX kernel module is not installed!
I tried to delete the avd, avd-folder from the windows user-specific folder and re-created the similar avd but no progress.
How can I run the avd again? (after the SDK update)

Create emulator in CPU/ABI in ARM, this error only exist for Intel processor.
If you want to create AVD CPU/ABI in Intel gor for this process,
Make sure you have instaled HAXM installer on your SDK Manager.
After you download it make sure you run the setup located in: {SDK_FOLDER}\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm.exe
If you get the error "VT not supported" during the installation disable Hyper-V on windows features. You can execute this command dism.exe /Online /Disable-Feature:Microsoft-Hyper-V. You will also need "Virtualization Technology" to be enabled on your BIOS

I've run into the same problem here and in my research I was able to find a documentation on the android developer site that helped me out with this.
Start the Android SDK Manager, select Extras and then select Intel Hardware Accelerated Execution Manager.
After the download completes, run [sdk]/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:
SERVICE_NAME: intelhaxm
...
STATE : 4 RUNNING
...
Refer to this documentation here: Using the Emulator - Configuring VM Acceleration on Windows
Hope it helps.

I am having the same problem. I did change my BIOS and all previously, when I was running Windows 7. Now I'm up on 8.1 and the VT-x is not supported. Thus, apparently it does not work on Windows 8. Intel link. Go down the page and it lists the Windows Operating Systems that it does support.
It also states that on the developer's page Android Developer's Using the Emulator; I have been researching other options, see this stackoverflow question, but when I check my BIOS it does not state "Intel Virtualization Technology" just "Virtualization Technology". I'm not sure at this point if my computer runs this or not. It should as it's an Intel i7.

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
...

FIXED
If you are having issues with the HAXM and it's not working to do what everyone else is saying to do try this:
1.Make sure you've already tried the steps above
(Enable Virtualization in the BIOS, as well as Uninstall and Re-Install the HAXM option from the SDK Manager)
Exit out of Android Studio.
Download and Instal HAXM DIRECTLY from Intel.
https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager
Start Android Studio.
Voila!

On Android Studio 1.3 this worked for me:
Go to Tools -> Android -> SDK Manager
There under Appearance & Behavior -> System Setting -> Android SDK
From there click on the SDK Tools tab
You should see Intel x86 Emulator Accelerator in the list.
Mine was not installed. I clicked the check box to install it.

Related

Emulator not opening in Visual Studio for Xamarin mobile app development

I am trying to develop a mobile app using Xamarin and Visual Studio 2019 on a Windows 8.1 Pro operating system. I installed the .NET desktop development, ASP.NET and web development, and Mobile development with .NET workloads, and I am trying to run the Pixel 2 Pie 9.0 - API 28 emulator in Visual Studio.
When I try to launch the emulator through the Android Device Manager, I get the following error:
Device error: WARNING: unexpected '-prop' value ('monodroid.avdname=pixel_2_pie_9_0_-_api_28'), only 'qemu.' properties are supported WARNING: unexpected '-prop' value ('emu.uuid=a7af4d97-19e3-499d-9c26-334ea3d7cfe0'), only 'qemu.' properties are supported
enter image description here
When I try to launch the emulator through the green triangle at the top of the Visual Studio user interface, I get the following performance warning:
Performance Warning: Launching the Android Emulator pixel 2 pie 90-api_28 on Hyper-V needs Windows Spring Creators Update (Redstone 4) or newer installed. Please update your system and retry.
enter image description here
My laptops
OS : Windows 8.1 pro
64-bit Operating System
Processor: Intel(R) Core(TM) i3-5005U CPU # 2.00GHz
RAM : 4.00 GB
enter image description here
I went through Android Device Manager and edited the emulator I had installed. There I changed its name and processor to x86_64 instead of x86 and downloaded it. Then I restarted the computer and ran the emulator. But there also the same double error message as mentioned earlier, no difference. My data is limited so I didn't waste it on more guesswork. But I will gladly accept any of your recommendations
I want to solve the above problems under this operating system. I am currently unable to upgrade my operating system to Windows 10 or 11. I want to work in Visual Studio with minimal error messages. Having to use another emulator or old technology is not a problem there.
What could be causing these errors, and how can I resolve them? Any help or suggestions would be greatly appreciated. Thank you in advance.
Although not directly related to this, I will mention the following issues.
When I installed the emulator in Visual Studio Xamarin I got a prompt to install intel HAXM. But its automatic installation failebd and I downloaded and installed it manually from Intel website there. After that I got the two errors in the screenshot above.
When doing that I had installed both the latest version of Visual Studio 2022 and this 2019 version. (I was able to install both in Windows 8.1 Pro) Then I uninstalled the 2022 version.
Also, even though I installed it under the update I received for version 16.11.25 of Visual Studio, over a day later, It's not updated in the Visual Studio installer or the versioned install in the IDE.
And in my Visual Studio installer, above the Modify button, under Total Space Required , 13MB of non-removable space is noted. I have run the Modify button several times but it won't go away. (That may have something to do with the note "System cache, tools, and SDKs with fixed locations - 13 MB" on the Installation locations tab in the installer.)
When opening ASP.NET and wed development and Mobile development with .NET (out of support) workloads for the first time, the nuget.org package source was not included in the package sources by default. So the packages got errors. I then solved the problem by adding the nuget.org package to the source.
You can check this Hardware acceleration for emulator performance (Hyper-V & HAXM) for more information.
In this article, you can see the minimum criterion of the Hyper-V.
Your computer hardware must meet the following requirements:
A 64-bit Intel or AMD Ryzen CPU with Second Level Address Translation
(SLAT).
CPU support for VM Monitor Mode Extension (VT-c on Intel CPUs).
Minimum of 4-GB memory.
Virtualization Technology (may have a different label depending on
motherboard manufacturer).
Hardware Enforced Data Execution Prevention.
Verify that the Windows Version is at least 1803
To verify that your computer hardware and software is compatible with Hyper-V, open a command prompt and type the following command: systeminfo.
I unticked Hyper-V through the control panel and restarted the computer, where the emulator opened without error messages. But it takes a long time

Visual Studio: Xamarin - Error starting Android Emulator

Problem encountered on https://dotnet.microsoft.com/learn/xamarin/hello-world-tutorial/devicesetup
Operating System: Windows 10 Pro
Using the Hello World xamarin example in Visual Studio - I'm unable to start the Android Emulator.
When I click on the Run button in the Android Device Manager - the error appears immediately (See attached)
Error-AndroidDeviceManager (Emulator including Google Play/Google API)
Emulator error
Device error: WARNING: unexpected '-prop' value ('monodroid.avdname=pixel_2_pie_9_0_-_api_28'), only 'qemu.' properties are supported
WARNING: unexpected '-prop' value ('emu.uuid=4b63b139-cc77-4b66-9200-0d25f8fc545e'), only 'qemu.' properties are supported
Same Error when Emulator is not using Google Play/Google API
Same Error when Emulator is not using Google Play/Google API
Windows Specifications
Edition: Windows 10 Pro
Version: 1909
Processor
AMD Ryzen 9
Task Manager:
Performance: Virtualization is Enabled
cmd - systeminfo:
Hyper-V Requirements: VM Monitor Mode Extensions: Yes
Virtualization Enabled In Firmware: Yes
Second Level Address Translation: Yes
Data Execution Prevention Available: Yes
Visual Studio 2019
Windows Features On/Off (see attached - shows Hyper V / Virtualization enabled as per documentation):
WindowsFeatures
I tried this way too - adding the Virtual Machine Platform - same error
Android SDK Settings
Android SDK Version:
Could the issue be related to the Android SDK Tools - only showing Android SDK Command-line Tools versions 1.0 to 2.1?
Could the issue be related to Android Repository perhaps missing on the bottom right hand side?
I've now also included the Android SDK Repository under the tools - but this is still not coming through:
You should also check Virtual Machine Platform in Turn Windows features on or off. Also, note that the tutorial that you linked to use an Android device for USB debugging.
EDIT
Here are my Android SDK Manager settings
Platform Settings
Tools
I had also the same problem, but I have already fixed as next process.
disable both [Hyper-V] and [Windows Hypervisor Platform].
restart PC.
enable both [Hyper-V] and [Windows Hypervisor Platform].
restart PC.
I had exactly the same problem, so I went to my UEFI settings and I realized that my SVM Mode was disabled. I don't know what motherboard you have but for Gigabyte this usually is in:
M.I.T → Advanced CPU Core Settings → SVM Mode
Disable the hyper-v via the following command on command line and reboot.
bcdedit /set hypervisorlaunchtype off
Enable it back with the following command and reboot.
bcdedit /set hypervisorlaunchtype auto
Now my emulator runs!
It seems like there is some kind of conflict with virtualization as per this and it effects creating Linux VMs too but these steps clears it.
The answer by suzukimi is right but I provided the commands and some additional info.
I had the same problem, solved it by turning on the virtualization in the bios
I struggled with this issue for 2 days. I even installed Android Studio and run its own emulator to make sure the issue is not Xamarin. Finally it is solved. In my Dell laptop running Windows 10 with Hyper-V installed, there are two issues causing this:
Run Command prompt in Admin mode. type bcdedit. On the last entry all the way down, make sure hypervisorlaunchtype is Off. By default it is set to Auto.
To change this setting, type:
bcdedit /set hypervisorlaunchtype off
Make sure to run the emulator on the laptop screen. Not on any other monitor. Somehow Android emulator crashed my laptop graphics driver when it is on other monitor.
I had same issue after I brainlessly type some command which ADB I think recommend it to me. After a while a realize, that even WSL does not work (Ubuntu in WSL and Docker) so I started to troubleshoot this one and finaly find solution
DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V
bcdedit /set hypervisorlaunchtype auto
source
this typing in powershell fix all issues for me with Hyper-V and WSL
I had the same issue turns out the issue was that the intel HAXM wasn't installing properly from the SDK manager window.
So I downloaded the Installer directly from the repo. and installed it via the exe.
here: https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager
Restarted Visual studio. Worked perfectly.
Go to BIOS and enable Virtualization Technology and of course also make sure the Windows Feature (Hyper-V is installed - all components).
In my case, BIOS was reset when I changed my CPU battery.
This recently happened to me. After some research, I discovered that Microsoft Hyper V was the issue, but the machine I was trying to use it on was Windows 10 Home edition. It had to be Professional, Enterprise, etc. It's not compatible with the version of Windows. Hope this helps.

Unable to use x86 emulator with Xamarin

I'm trying to follow along with the Xamarin guide for Android. I'm getting an alert saying that x86 emulators are 10x faster. But when I try to use an X86, version whether I create it or using the default one it fails. This happens on windows as well as mac. It works just fine with an arm processor.
Unable to use x86 emulator with Xamarin
Have you disabled Hyper-V in your computer? If you didn't turn off this windows feature, you will get error message " it fails" when you use an X86 Android emulator.
You should turn off your Hyper-V :
Run Cmd as administrator
Execute the following commond :
bcdedit /set hypervisorlaunchtype off
Reboot your computer
And if you want a better performance, you should use Hardware Acceleration.
The problem was because I didn't have HAXM installed. I had to go into the BIOS and enable virtualization. Then install HAXM from Intel's site. For some reason I can do it view SDK manager.

Can't install Windows Phone 8.1 Emulator

So I have a HP laptop, and as many HP users know it's a nightmare to install Hyper-V on it. But I somehow managed. Hyper-V is running on my laptop and I have all the necessary hardware requirements:
SLAT is enabled
VT-x is supported and enabled
I'm running 64 bit Windows 8.1 Professional
I'm running Visual Studio 2013 Professional Update 3
Hardware D.E.P. is enabled and supported
And yet when I run the Phone Emulator installation I get the following display:
I can't figure out what's going on or why I keep getting the error. Hyper-V is running as shown:
I've spent two days already trying to figure this out and searching on Google for a solution to this problem. Some of the things I've tried:
Flashing my BIOS
Resolving issues with the Realtek BlueTooth driver (this causes issues with Hyper-V)
Reseting my BIOS
Doing a clean install of my whole system
Installing all Windows Updates
Installing all Visual Studio updates
Enabled / Disabled D.E.P.
Any advice is appreciated. If you need the log from the emulator installation let me know and I'll post it here.
Thanks
UPDATE:
I've attempted to install winsows server standard 2012 and tried enababling hyper-v and installing visual studio and the phone emulator there, and that works and I'm able to run the emulators with no problem.
When I tried the same thing back after installing windows 8 again it installs hyper-v but fails to start windows after installing visual studio update 2 with the phone images etc. The only way I can boot back into windows is if I turn off virtualization in bios.
So it turns out that HP Pavilion laptops support all that is needed to run Hyper-V, however it looks as if HP is blocking the SLAT functionality from working properly with Hyper-V thus not allowing it to run correctly. This looks like it's blocked at the BIOS level.
Updating the BIOS doesn't solve the issue.
The way I came to this conclusion is that Windows Server running Hyper-V runs the Windows Phone emulator with no problems, and it's a Microsoft decision to not require SLAT when running Hyper-V on Windows Server while requiring it on Desktop version of Windows.
Seeing how I paid extra for a more powerful laptop to be able to use features like Hyper-V, and to have an experience such as this due to a manufacturer configuration has left a bitter taste in my mouth. Needless to say this is the LAST time I'll ever buy an HP laptop.

windows phone emulator not supported due to graphics processing unit configuration (windows 7 on mac)

I'm getting an error when I start up the windows phone emulator:
windows phone emulator not supported because your computer does not have the required graphics processing unit configuration. An XNA framework page will not function without a graphics processing unit. Do you want to continue starting the emulator?
And when I attempt to access a web page (any web page) - I just get a blank screen. How do I resolve this?
I'm running windows 7 on a mac.
Check out the system requirements for the emulator on MSDN.
Start by updating your graphics drivers to the latest available. If that doesn't work the next step would be to upgrade the graphics card, if you can.
A PC which won't run the emulator can probably still be used to develop and debug on a real device.
It may be you're also trying to run the latest SDK 7.1 which is far more restrictive than 7.0. If you find yourself unable to run 7.1, dropping down to 7.0 may work on your particular machine.
If you are running Windows 7 on a Virtual Machine on Mac OS X it won't work because there are some restrictions on running a Virtual Machine inside a Virtual Machine.
The quick and easy solution for this is installing Windows 7 in bootcamp, it worked for me.

Resources