Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No Emulator tab in Edit Configurations in Android Studio

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.

enter image description here

like image 813
ashubuntu Avatar asked Nov 25 '15 05:11

ashubuntu


People also ask

Why is the emulator not showing in Android Studio?

The Best Answer isCheck in your build. gradle file if the targetSDK and minimumSdk version is lower or equal to the sdk version of your Emulator. If your case is different then restart your Android Studio and run the emulator again.

Where is the emulator folder in Android Studio?

The default location of this directory varies by platform: On Windows, it's the %LocalAppData%\Android\Sdk directory. This normally expands to C:\Users\<username>\AppData\Local\Android\Sdk , although it might vary based on your system.

How do I enable Android emulator in Visual Studio?

Just open up the Visual Studio Emulator for Android entry in your Start Menu, hit play, and the emulator is ready to debug from any IDE. Download the standalone emulator today!


2 Answers

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 
like image 164
V P Avatar answered Nov 28 '22 10:11

V P


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

  1. Find workspace.xml in you project dir
  2. 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

  1. 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

like image 20
Igor Tyulkanov Avatar answered Nov 28 '22 10:11

Igor Tyulkanov