列出可用 avdname 的命令是什么
我知道我可以通过键入启动模拟器 avd
emulator.exe @avdname
但是是否有命令列出可用的 avdnames? 这个 avd 配置存储在哪里?
I know I can start the emulator avd by typing
emulator.exe @avdname
But is there a command to list the available avdnames?
Where are this avd configuration stored?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(10)
使用 sdk/tools/emulator
这将列出所有可用的 avd
Using sdk/tools/emulator
This will list all available avds
AFAIK
avdmanager list avd
就是您所需要的。AFAIK
avdmanager list avd
is what you need.进入 Android/sdk/tools 并运行以下命令,
该命令将返回类似的内容
get into Android/sdk/tools and run following command
which will return something like
列出所有模拟器:
运行列出的模拟器之一:
,其中模拟器位于:
List all your emulators:
Run one of the listed emulators:
where emulator is under:
我尝试了一些组合,它起作用了:),很明显,
输出
现在
是这样的,我可以从控制台启动模拟器
I try few combination and it worked :), it was pretty obvious
the output is something like this
now with
I can start the emulator from console
这是一篇旧帖子,但我目前正在使用此脚本来显示 avd 名称并启动一个。
这是运行和输出的示例:
This is an old post, but I am currently using this script to display the avd names and start one.
Here is an example run and output:
在 Mac 和 Linux 操作系统上:
Android/sdk/emulators
./emulator -list-avds
这将为您提供在系统上创建的所有 avd。
On Mac and Linux operating system:
Android/sdk/emulators
./emulator -list-avds
This will give you all the avd's created on your system.
我有一个简单的方法(仅适用于 Windows):
首先在系统中设置 adb 的永久路径(与 java 非常相似)。找到你的,对于大多数情况 -
C:\Program Files\android\android-sdk\platform-tools
并复制它。现在浏览您的系统属性并找到高级系统设置。现在找到环境变量,在系统变量选项卡中找到路径。如果没有路径,则创建一个新变量并将其命名为 Path 并将复制的值粘贴到下一个字段中。但是如果已经有一个 Path,则打开它并在值框的最后放置一个;
分号并粘贴复制的值。现在你就快完成了。!在cmd中输入
adb
来检查它adb devices
,这就是您想要的。干杯。!I have a simple method (Only for windows):
First of all set permanent path to adb in your system (Pretty similar like java). Find yours, For most of cases -
C:\Program Files\android\android-sdk\platform-tools
and copy it. Now go through your system properties and find Advance System Setting. Now find Environment Variable, in system variable tab find path. If there is no path then create a new variable and name it Path and paste the copied value in next field. But if there is already a Path, then open it and put a;
semi-colon at the last of value box and paste the copied value.Now you are almost done.! Check it by typing
adb
in cmdand now type
adb devices
, thats what you wanted. Cheers.!首先检查模拟器 exe 是否已安装并且存在于 PATH 环境变量中:
Windows:
模拟器所在
*nix/Mac:
哪个模拟器
如果找不到模拟器,请安装它或修复 PATH 以包含其路径。
您可以通过运行命令来检查 PC 中是否存在 AVD:
INI 文件是您可以运行的 AVD 的名称。
如果您配置正确,那么查看 AVD 就非常容易了。运行命令:
要启动这些 avd 中的任何一个,请运行命令(我正在使用它):
然后将启动一个甜蜜的 AVD。
干杯!
注意:
adb devices
命令只会列出当前运行的 avds 和真实的 Android 设备。它不会显示模拟器(即配置的 avds)。First check if the emulator exe is installed and is present in the PATH env variable:
Windows:
where emulator
*nix/Mac:
which emulator
If no emulator found, either install it or fix the PATH to include its path.
You can check for the avd's present in your PC by running command:
The INI files are the name of the AVDs that you can run.
If you have configured things properly, looking the AVDs is quite easy. Run command:
To launch any of these avds, run the command (I am using which I am working on it):
And a sweet AVD will be launched.
Cheers!
NOTE:
adb devices
command will only list the currently running avds and real android devices. It will not show emulators (i.e. avds configured).对于到达此处的 Mac 用户,您可以在 /Users/YOURUSERNAME/Library/Android/sdk/tools/ 找到前面提到的 android/sdk/tools 目录
For Mac users arriving here, you can find the previously mentioned android/sdk/tools directory at /Users/YOURUSERNAME/Library/Android/sdk/tools/