公司 Windows 有监控和 杀毒扫描,很卡,不得已又用回 Linux,即便如此也只能用虚拟机的方式
环境:Elementary 0S 5.1 ( Ubuntu 18.04 LTS (bionic) )
KVM requires a CPU that supports vmx or svm
找到 Android SDK 目录下的 emulator 目录,然后切到终端查一下有哪些 avd:
./emulator -list-avds
然后直接用名字启动即可:
./emulator -avd AVD_NAME
启动不了会报错,比如:
INFO | Android emulator version 31.1.4.0 (build_id 7920983) (CL:N/A) WARNING | unexpected system image feature string, emulator might not function correctly, please try updating the emulator. ERROR | x86_64 emulation currently requires hardware acceleration! CPU acceleration status: KVM requires a CPU that supports vmx or svm More info on configuring VM acceleration on Linux: https://developer.android.com/studio/run/emulator-acceleration#vm-linux General information on acceleration: https://developer.android.com/studio/run/emulator-acceleration.
关闭虚拟机,去虚拟机的 CPU 设置中开启各种虚拟化即可。
/dev/kvm device permission denied
先装软件包:
sudo apt install qemu-kvm
追加权限:
sudo adduser username kvm
安装完重启(永久生效)。
或者直接粗暴一点(临时生效):
sudo chown username:username /dev/kvm
以上;
参考:https://stackoverflow.com/questions/37300811/android-studio-dev-kvm-device-permission-denied
本站由以下主机服务商提供服务支持:
0条评论