What you can do when your Android Studio could not start AVD on Ubuntu 18.04
$ kvm --version QEMU emulator version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.2) Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers $ kvm-ok INFO: /dev/kvm exists KVM acceleration can be used $ ls -l /dev/kvm crw-rw---- 1 root kvm 10, 232 May 28 18:20 /dev/kvm $ grep kvm /etc/group kvm:x:128:femoghalvfemsStill it didn't make any difference. The IDE kept showing the message "Error while waiting for device: Could not start AVD" and would never start the emulator.
$sudo chmod 777 /dev/kvm Of course, I knew it is usually not a good idea. Granting the full control permission to everyone would pose a threat to the entire system and even possibly cause another problem. But it worked, anyway. As I changed the directory permission, I became able to build apps using Android studio. Unfortunately, the case was not yet closed. In the following hours, I got another system crash and had to reinstall the whole system from a bootable flash drive. My workstation contained NVIDIA and CUDA property drivers that conflicted with some other modlues from time to time. They froze all the processes and threads. I could not even raise skinny elephants. So I reinstalled Ubuntu 18.04 LTS on my workstation and tried building apps with the latest Android Studio. This time, I could open the AVD by simply adding myself to kvm user group. And it worked well! I didn't do anything other than newly install a series of the required virtualization tools and add a new user. And it worked!
$ sudo adduser femoghalvfems kvm Adding user `femoghalvfems' to group `kvm' ... Adding user femoghalvfems to group kvm Done.Now I really don't know what prevented the IDE from running the virtual machine.
Comments
No comments yet. Leave the first one.
Leave a comment