I\'m running Android Studio on a Ubuntu VMWare virtual machine. The problem is that when I try to run an app with the AVD emulator I get the following errors in the console:
Bad news found in the Using the Emulator section of the official Android developer website:
Not Inside a VM - You cannot run a VM-accelerated emulator inside another virtual machine, such as a VirtualBox or VMWare-hosted virtual machine. You must run the emulator directly on your system hardware.
So it seems my best alternative is look for a real device compatible with the Android Studio for running the apps.
I faced this exact same error while running AVD in a cloud VM, adding a license solved it.
So, VMWare any cloud provider will not provide you the ability to create nested virtual machines. It is blocked by default so the Android studio would work but you would not be able to run an AVD, that’s not much useful.
To allow this you would then add the following license while VM creation-
https://compute.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx
Note: This works only for GCP, you need to add different licenses for VMWare
This was just a short just of what you would do and the major steps involved, however, I highly recommend you to read this blog by me which provides a step by step guide to doing so.
I also urge you to check this answer by me where I explain this in greater detail for GCP.
Install Android on a Cloud Virtual machine (AWS windows server)
Since my machine was slow with Android Studio I created a virtual machine on windows server on AWS with the best processor and RAM configurations, which gave me seamless programming and execution experience. But to use the emulator I face the error listed below.
Error:
Unable to install Intel HAXM
HAXM doesn't support nested virtual machines.
Unfortunately, the Android Emulator can't support virtual machine acceleration from within a virtual machine.
Here are some of your options:
1) Use a physical device for testing
2) Start the emulator on a non-virtualized operating system
3) Use an Android Virtual Device based on an ARM system image (This is 10x slower than hardware accelerated virtualization)
Since we can't connect our device to the Cloud machine, the option #3 is the best way to go.
Once the Android studio is installed,
Go to Tools -> Android -> AVD Manager
Click "Create Virtual Device"
Select which device you want to use from the list (i.e Nexus 5) and click "Next".
Here you're given a list of android release versions. Look at the ABI column.
Choose "Armeabi-v7a" for whichever API Level you want.
Hit "Next" and modify name/size, click "Finish" when done.
if 'Next' doesn't work, download the desired image and continue
I faced the same problem. I searched and I found the solution it works with me now:
In VMware:
Hope that works with you.
This link HW virtualization in VMware (KVM - Android Studio) helped me to find the solution.
I have android emulators running inside VMWare guest. It is utilizing Windows and not Linux, but the principles apply. As has been mentioned, the biggest item is ensuring the the VMWare processor setting for virtualization is checked.
Here are my specifics: I'm running Win10 for both Host and Guest. I have Android studio and android emulators running inside of a single VMWare guest which is being run using VMWare's player software.
Here are the versions:
Windows 10 64 bit both host and guest.
Windows 10 guest Ram 6 Gig
Android studio 3.3.2
AVD Emulator
VMWare Player 12, 12.5.1 build-4542065
VMware Number of Processors: 1
VMWare Setting for Processors: Virtualize Intel VT checked.
You have vCenter and vSphere Web client use this to edit the VMs config Right click the Your_Windows_GuestOs > Edit Settings > CPU > Check the box "Expose hardware assisted virtualization to the guest OS .