gpt4 book ai didi

android - 如何使用 avdmanager 从命令行安装特定的模拟器?

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:35:28 25 4
gpt4 key购买 nike

正如 How to create Android Virtual Device with command line and avdmanager? 中指出的那样原则上可以从命令行创建 AVD。虽然这并不简单。在文档之后,应该有一个选项 -t,它通过指定 targetId 来指定要模拟的特定设备。

不幸的是,从版本 25.3.1 开始,avdmanager 无法识别选项 -t。有一个选项 --tag 但它似乎不是 -t 的等价物,因为它无法识别提供的 targetId (采用从列表中)。

如何指定要模拟的设备?

最佳答案

例如回声“不” | avdmanager --verbose create avd --force --name x86 --device "4in WVGA (Nexus S)"--package "system-images;android-24;google_apis;x86"--tag "google_apis"--abi "x86”

地点:

Usage:
avdmanager [global options] create avd [action options]
Global options:
-s --silent : Silent mode, shows errors only.
-v --verbose : Verbose mode, shows errors, warnings and all messages.
--clear-cache: Clear the SDK Manager repository manifest cache.
-h --help : Help on a specific command.

Action "create avd":
Creates a new Android Virtual Device.
Options:
-a --snapshot: Place a snapshots file in the AVD, to enable persistence.
-c --sdcard : Path to a shared SD card image, or size of a new sdcard for
the new AVD.
-g --tag : The sys-img tag to use for the AVD. The default is to
auto-select if the platform has only one tag for its system
images.
-p --path : Directory where the new AVD will be created.
-k --package : Package path of the system image for this AVD (e.g.
'system-images;android-19;google_apis;x86'). [required]
-n --name : Name of the new AVD. [required]
-f --force : Forces creation (overwrites an existing AVD)
-b --abi : The ABI to use for the AVD. The default is to auto-select the
ABI if the platform has only one ABI for its system images.
-d --device : The optional device definition to use. Can be a device index
or id.

关于android - 如何使用 avdmanager 从命令行安装特定的模拟器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42966496/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com