在 Android Studio 2.3.3 中为 AVD 提供额外的命令行选项?
Provide Additional command line options to AVD in Android Studio 2.3.3?
正在此处尝试在 ubuntu 上设置 kvm。
官方文档只指出ubuntu docs安装kvm
提供的步骤 here and here
在 Android Studio
中说
- 转到 运行 > 编辑配置。
- 要设置为所有项目的全局默认值,select "Android
"Defaults".
下的申请”
- 转到模拟器选项卡,选中 "Additional command line options"
- 添加-qemu -m 2047 -enable-kvm
选项卡在 2.3.3 中不存在,并且已经是
但问题是 reported and closed 预期的行为,没有有效的答案 运行
-qemu -m 2047 -enable-kvm
更新 1
支持 KVM
nishon@nishon-Inspiron-5420 ~ $ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
nishon@nishon-Inspiron-5420 ~ $ egrep -c '(vmx|svm)' /proc/cpuinfo
4
Passing the additional while launching avd from bash shell seems to be
working. I am entirely not sure though.
nishon@nishon-Inspiron-5420 ~ $ emulator -avd [Enter AVD name] -qemu -m 2047 -enable-kvm
在绑定此命令之前,您需要在 .bashrc(Ubuntu) 或路径(Windows)
中设置 ADB 路径
参考https://developer.android.com/studio/run/emulator-commandline.html
我也需要模拟器的额外命令行选项
但无论如何我找到了另一种方法......
前往 sdk/tools
cd ~/Android/Sdk/tools
运行 此命令使用系统库启动 avd..
./emulator -avd YOUR_AVD_NAME -use-system-libs
当模拟器 运行 在后台运行时,这些应用程序对我来说运行良好。
正在此处尝试在 ubuntu 上设置 kvm。
官方文档只指出ubuntu docs安装kvm 提供的步骤 here and here 在 Android Studio
中说- 转到 运行 > 编辑配置。
- 要设置为所有项目的全局默认值,select "Android "Defaults". 下的申请”
- 转到模拟器选项卡,选中 "Additional command line options"
- 添加-qemu -m 2047 -enable-kvm
选项卡在 2.3.3 中不存在,并且已经是
但问题是 reported and closed 预期的行为,没有有效的答案 运行
-qemu -m 2047 -enable-kvm
更新 1 支持 KVM
nishon@nishon-Inspiron-5420 ~ $ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
nishon@nishon-Inspiron-5420 ~ $ egrep -c '(vmx|svm)' /proc/cpuinfo
4
Passing the additional while launching avd from bash shell seems to be working. I am entirely not sure though.
nishon@nishon-Inspiron-5420 ~ $ emulator -avd [Enter AVD name] -qemu -m 2047 -enable-kvm
在绑定此命令之前,您需要在 .bashrc(Ubuntu) 或路径(Windows)
中设置 ADB 路径参考https://developer.android.com/studio/run/emulator-commandline.html
我也需要模拟器的额外命令行选项
但无论如何我找到了另一种方法...... 前往 sdk/tools
cd ~/Android/Sdk/tools
运行 此命令使用系统库启动 avd..
./emulator -avd YOUR_AVD_NAME -use-system-libs
当模拟器 运行 在后台运行时,这些应用程序对我来说运行良好。