Reputation: 317
Put in KVM (Kernel-based Virtual Machine) into my 64 bit Ubuntu 14.04 LTS per: https://help.ubuntu.com/community/KVM/Installation
In the terminal:
kvm-ok INFO: /dev/kvm exists KVM acceleration can be used
OK so the KVM is in.
When I run the Android Emulator there is no change from the way the Emulator ran before I put in the KVM.
I've looked in to the various settings within Android Studio, and I found nothing obvious about KVM.
Does Android Studio have a setting somewhere to enable KVM?
Upvotes: 18
Views: 42949
Reputation: 89
Gabor as far as I can tell is correct (and addresses the OP's question) - the option to use this acceleration by starting the emulator from within Android Studio 1.5 has been removed.
(Weirdly, I don't seem to be able access the acceleration when starting the emulator from the command line once Android Studio 1.5 has been installed - but maybe I'm wrong.)
Upvotes: 5
Reputation: 2617
Alright, so when you see the message (on Android Studio v2 and higher):
KVM is required to run this AVD.
/dev/kvm device: permission denied
Grant current user access to dev/kvm
What you can do (manually, since I haven't found anything in Android Studio) to fix this is:
sudo adduser your_linux_user kvm
sudo apt install qemu-kvm
and try to add your user again into the kvm group.This setting works totally fine in Ubuntu 18.04/18.10, but it should work in other distros as well.
Upvotes: 9
Reputation: 1874
You can do this:
Click on Run
-> Edit Configurations
and go to the Emulator
tab
You can add it on "additional commandline options":
-qemu -enable-kvm
I'm not sure if there is also a GUI option somewhere though, or how to check if it is working or not.
I'd test the x86 image to see if it works any faster.
Upvotes: 7