答案 0 :(得分:4)
我的解决方案是重命名/ tools / emulator 到/tools/emulator.0
然后只需要下面的shell脚本调用emulator.0并附加qemu标志
#!/bin/bash
# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
# echo "DIR is '$DIR'"
$DIR/emulator.0 "$@" -qemu -m 512 -enable-kvm
答案 1 :(得分:3)
看起来像一个错误,这个案例有issue 195031
<强>更新强>
我不知道如何修复它,但你可以尝试下一步
workspace.xml
找到您的配置,它应该是
<configuration default="false" name="app" type="AndroidRunConfigurationType" factoryName="Android Application">
并检查name
属性,您的配置可能命名为
写下你需要的参数,e。克。
<option name="USE_COMMAND_LINE" value="true" />
<option name="COMMAND_LINE" value="" />
<option name="WIPE_USER_DATA" value="false" />
<option name="DISABLE_BOOT_ANIMATION" value="false" />
<option name="NETWORK_SPEED" value="full" />
<option name="NETWORK_LATENCY" value="none" />
也许它会起作用
答案 2 :(得分:0)
由于“Emulator”选项卡在配置中不再存在,我找到了解决方法;
假设Android/Sdk
的位置在主目录中;运行以下命令
LD_LIBRARY_PATH=~/Android/Sdk/tools/lib64 ~/Android/Sdk/emulator/emulator64-x86 -avd <AVD_NAME> -qemu -m 2047 -enable-kvm
注意强>
~/Android/Sdk/system-images
emulator -list-avds
文件夹中的\Android\tools
检查AVD列表。