Issue
I have Android Studio and I have created virtual device that I want to launch via Android Studio.
In my avd
folder I have this Pixel_XL_API_27.adv
file that created.
Now I want to launch my virtual Android device via command line. First I wrote emulator -list-avds
and received Pixel_XL_API_27
.
But when I type emulator Pixel_XL_API_27
and the result that I received is this message:
No AVD specified. use @foo or -avd foo to lunch a virtual device named foo
Update
Solution
Run this:
emulator -avd Pixel_XL_API_27
For more information about options see https://developer.android.com/studio/run/emulator-commandline
UPDATE
Be sure to set ANDROID_HOME
environment variable and type proper command in your terminal/cmd:
Window:
%ANDROID_HOME%\emulator\emulator.exe -avd Pixel_XL_API_27
Linux:
$ANDROID_HOME/emulator/emulator -avd Pixel_XL_API_27
The problem is sometimes (mostly in Windows) when you add emulator
folder in PATH
variable, and use emulator -avd avd_name
command, current working directory in used to search for other SDK tools, instead of real ANDROID_HOME
directory. So you should provide full path for emulator.exe
file to start your emulator.
Answered By - Sepehr Behroozi
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.