snapcrafters / android-studio

A community-maintained package to easily install Android Studio on Linux
https://developer.android.com/studio/index.html
47 stars 16 forks source link

Cannot launch emulator no permission to /dev/kvm #40

Closed lwbt closed 5 years ago

lwbt commented 5 years ago

When trying to run an app and creating a virtual device Android Studio says:

Recommendation:
/dev/kvm device: permission denied.

It won't let me continue with any of the options available.

I'm not sure if KVM support is possible inside a snap. I added my user name to the KVM group. Running the app through ADB on a connected device works though.

$ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
om26er commented 5 years ago

Please install the package qemu-kvm and reboot. The issue is unrelated to snaps see here for example https://stackoverflow.com/questions/37300811/android-studio-dev-kvm-device-permission-denied

lwbt commented 5 years ago

Okay just tried it on another computer and it works after rebooting.

ciscorucinski commented 5 years ago

Here is a more in-depth tutorial. It tells you if your machine even supports KVM, installs a little more, and verifies installation...

ciscorucinski commented 5 years ago

The emulator is an extremely highly connected part of AS. While it isn't required to run the snap, it would be highly beneficial to include it in the snap or support another snap that correctly initializes KVM support and gives the current user permission