简体   繁体   English

如何在 Ubuntu 上为 Android Studio 配置 KVM?

[英]How to configure KVM for Android Studio on Ubuntu?

No matter how I configure my system, Android Studio shows the "We have detected that your system can run the android emulator in an accelerated performance mode. Linuxed-based systems support virtual machine acceleration through the KVM. Search for install instructions for your particular Linux configuration hat KVM is enabled for faster Android emulator performance."无论我如何配置我的系统,Android Studio 都会显示“我们检测到您的系统可以在加速性能模式下运行 android 仿真器。基于 Linux 的系统支持通过 KVM 进行虚拟机加速。搜索您的特定 ZEDC9F0A5A5D47473973 的安装说明启用配置帽子 KVM 以提高 Android 仿真器性能。”

egrep -c '(vmx|svm)' /proc/cpuinfo gives 8 egrep -c '(vmx|svm)' /proc/cpuinfo给出8

kvm-ok gives INFO: /dev/kvm exists KVM acceleration can be used kvm-ok给出INFO: /dev/kvm exists KVM acceleration can be used

grep kvm /etc/group gives kvm:x:108:currentLoggedInUser grep kvm /etc/group给出kvm:x:108:currentLoggedInUser

How should I configure KVM correct on Ubuntu 19.10?我应该如何在 Ubuntu 19.10 上正确配置 KVM? And how could I tell if Android Studio is running the VM using KVM?我怎么知道 Android Studio 是否正在使用 KVM 运行 VM?

Thanks.谢谢。

i had same issue, but the other way around.我有同样的问题,但反过来。 To make it work, first make sure you've enabled virtualization in the BIOS and added your username in libvirt.要使其工作,首先确保您已在 BIOS 中启用虚拟化并在 libvirt 中添加您的用户名。

  1. Click cancel on the screen that shows Android KVM在显示 Android KVM 的屏幕上单击取消图片在这里
  2. Android Studio will offer you to two options. Android Studio 将为您提供两种选择。 Choose the one "don't start the setup wizard" (not the recommended one), so it will take you to the welcome screen.选择“不要启动设置向导”(不是推荐的),它会带你进入欢迎屏幕。
  3. Start a new project as usual and Android Studio will say couldn't find the SDK.像往常一样开始一个新项目,Android Studio 会说找不到 SDK。类似的图片描述在这里
  4. Choose the libraries and emulators to download and the rest is the same as usual.选择要下载的库和仿真器,rest 和往常一样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM