General and Miscellaneous tabs are showing but Emulator tab is missing which was up next to General in Android Studio 1.4 before updating to Android Studio 1.5 - I cannot fix it.
问题:
回答1:
My solution was to rename /tools/emulator to /tools/emulator.0
And then just have the below shell script that calls the emulator.0 and appends the qemu flags
#!/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
回答2:
Looks like a bug, there is issue 195031 for this case
Updated
I don't know how to fix it, but you can try next
- Find
workspace.xml
in you project dir Find your configuration, it should look like
<configuration default="false" name="app" type="AndroidRunConfigurationType" factoryName="Android Application">
and also check name
attribute, your configuration may named different
Write params you need, e. g.
<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" />
Maybe it will work
回答3:
As "Emulator" tab doesn't exist in configuration any more, there is workaround I found;
Assuming that the location of Android/Sdk
is in home directory; Run following command
LD_LIBRARY_PATH=~/Android/Sdk/tools/lib64 ~/Android/Sdk/emulator/emulator64-x86 -avd <AVD_NAME> -qemu -m 2047 -enable-kvm
Note
- Ensure that you have installed System images. You can check it in
~/Android/Sdk/system-images
- Ensure that virtualization is on in BIOS and supported by your current OS/machine. Steps
- You have created AVD that you can find in "~/.android/avd". Mention the name in above command. You can also check the list of AVDs using
emulator -list-avds
from\Android\tools
folder.
Source