Android Studio: /dev/kvm device permission denied

后端 未结 27 3120
鱼传尺愫
鱼传尺愫 2020-12-02 03:12

When I try to run my Android app on an emulator I get this error:

/dev/kvm permission denied.

I checked the permissions and ad

相关标签:
27条回答
  • 2020-12-02 03:45

    In order to make a virtual device in Linux - I have to follow this three command and it helps me to avoid trouble for building avd devices - the process are -

    sudo apt install qemu-kvm
    sudo adduser $USER kvm
    sudo chown $USER /dev/kvm 
    

    so, now you are good to go, restart android studio and start building application with emulator.

    0 讨论(0)
  • 2020-12-02 03:46

    Here is a simple solution

    open the terminal and run the following commands

    sudo groupadd -r kvm
    

    sudo gedit /lib/udev/rules.d/60-qemu-system-common.rules
    

    Add the following line to the opened file and save it

    KERNEL=="kvm", GROUP="kvm", MODE="0660"

    Finally run:

    sudo usermod -a -G kvm <your_username>
    

    Reboot your PC and Done!

    0 讨论(0)
  • 2020-12-02 03:46

    I countered the same problem and to solve this issue just type the following commands in terminal for Linux clients

       sudo apt-get install qemu-kvm
    
        // type your password
    
       sudo chmod 777 -R /dev/kvm
    

    and after that try running simulator it'll work

    0 讨论(0)
  • 2020-12-02 03:46

    What finally fixed it for me on Ubuntu 18.04 was:

    sudo apt install qemu-kvm
    sudo adduser $USER kvm
    sudo chown $USER /dev/kvm
    
    0 讨论(0)
  • 2020-12-02 03:46

    This Worked For Me on Linux (x18) ☑ Hope It Will Work For You Aswell

    sudo chown hp /dev/kvm
    
    0 讨论(0)
  • 2020-12-02 03:47

    Try this, it worked for me:

    1. sudo apt install qemu-kvm

    2. sudo chown -R <username>:<username> /dev/kvm

    0 讨论(0)
提交回复
热议问题