简体   繁体   English

在Android Studio中为模拟器启用kvm作为默认值

[英]Enable kvm as default for the emulator in Android Studio

I was following these directions to get the emulator working in Android Studio in Ubuntu Linux. 我遵循这些指示来使模拟器在Ubuntu Linux中的Android Studio中工作。 Step 8 says: 步骤8说:

  1. Add the emulator command line options. 添加模拟器命令行选项。

    i. 一世。 In Android Studio, go to Run > Edit Configurations. 在Android Studio中,转到运行>编辑配置。
    ii. II。 To set as global default for all projects, select "Android Application" under "Defaults". 要将所有项目设置为全局默认值,请在“默认值”下选择“ Android应用程序”。
    iii. III。 Go to the emulator tab, check "Additional command line options" and add: 转到仿真器选项卡,选中“其他命令行选项”并添加:

     -qemu -m 2047 -enable-kvm 

But I don't see an emulator tab. 但是我没有看到仿真器标签。 Did something change? 有什么变化吗? Where do I add the additional command line options? 在哪里添加其他命令行选项?

在此处输入图片说明

This bug report indicates that this was removed on purpose but no alternative way to enter these settings was provided. 该错误报告表明已故意删除此错误 ,但未提供输入这些设置的替代方法。

This answer seems to provide a workaround. 该答案似乎提供了一种解决方法。 This worked for me but beware that you'll need to specify the same amount of memory as for the AVD in the script, so this might not work for you if you have more than one AVD for testing. 这对我有用,但是请注意,您需要为脚本中的AVD指定相同的内存量,因此,如果您要测试多个AVD,这可能对您不起作用。 Cf the emulator command line options . cf 模拟器命令行选项

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

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