设置的Andr​​oid AVD命令行硬件配置文件命令行、配置文件、硬件、Andr

2023-09-08 09:38:18 作者:再累也不服输

在通过以下命令通过命令行创建一个新的Andr​​oid AVD:

When creating a new Android AVD through command line through the following command:

android create avd -n <name>

您会遇到下面的输出:

Do you wish to create a custom hardware profile [no]

通过创建一个完全自动化的脚本,将创建一个新的AVD并运行一些测试(使用Robotium)我一直在负责。到目前为止,我只是一直在使用简单的批处理文件命令来实现这一点,但是,我似乎无法找到一个方法来prevent出现,并要求用户输入上述消息。有没有什么办法可以设置显示在此消息之前的硬件配置文件?

I've been tasked with created a fully-automated script that will create a new AVD and run some tests (using Robotium). So far, I've just been using simple batch file commands to achieve this, however, I can't seem to find a way to prevent the above message from appearing and requiring user input. Is there any way I can either set the hardware profile prior to this message appearing?

由于默认的硬件配置文件实际上是美元,我的情况pferred p $,只需打Enter键时,会出现此消息(在一些自动化的方式)将罚款以及工作,但是我不知道的方式做到这一点通过编写脚本。

Since the default hardware profile is actually preferred in my case, simply hitting 'Enter' when this message appears (in some automated way) would work fine as well, however I am not aware of a way to do this through scripting.

我是相当新的对这个问题的两个方面,Android和脚本,所以任何帮助是非常AP preciated!

I am fairly new to both aspects of this question, both Android and scripting, so any help is much appreciated!

推荐答案

尝试

echo no | android create avd -n <name>