如何从命令行在Ubuntu Linux上打开AVD管理器?

时间:2023-01-24 13:24:18

How to open the AVD manager on Ubuntu Linux from the command line?

如何从命令行在Ubuntu Linux上打开AVD管理器?

8 个解决方案

#1


-3  

Here's the command-line usage for creating an AVD:

以下是创建AVD的命令行用法:

android create avd -n -t [- ] ...

android创建avd -n -t [ - ] ...

Example : android create avd -n my_android1.5 -t 2

示例:android create avd -n my_android1.5 -t 2

If the target you selected was a standard Android system image ("Type: platform"), the android tool next asks you whether you want to create a custom hardware profile.

如果您选择的目标是标准的Android系统映像(“类型:平台”),则android工具接下来会询问您是否要创建自定义硬件配置文件。

Android 1.5 is a basic Android platform. Do you wish to create a custom hardware profile [no]

Android 1.5是一个基本的Android平台。您是否希望创建自定义硬件配置文件[否]

Use the create avd command to create a new AVD, specifying the --skin option with a value that references either a default skin name (such as "WVGA800") or a custom skin resolution (such as 240x432). Here's an example:

使用create avd命令创建新的AVD,使用引用默认外观名称(例如“WVGA800”)或自定义外观分辨率(例如240x432)的值指定--skin选项。这是一个例子:

android create avd -n -t --skin WVGA800

android创建avd -n -t --skin WVGA800

or you can refer from :-

或者您可以参考: -

http://developer.android.com/tools/devices/managing-avds-cmdline.html

http://developer.android.com/tools/devices/managing-avds-cmdline.html

#2


35  

For thoose coming here because the android avd command has been deprecated*, here's how to do it now:

因为android avd命令已经被弃用了,所以来到这里,现在是如何做到的:

Using Android Studio

Open Android Studio with a valid studio project (if you don't have one, simply create one empty). After you've your project open, go to Tools => Android => AVD Manager. Note that this menu does not appear if you don't have a valid Android Studio project open.

使用有效的工作室项目打开Android Studio(如果没有,只需创建一个空)。打开项目后,转到Tools => Android => AVD Manager。请注意,如果您没有打开有效的Android Studio项目,则不会显示此菜单。

Now you can safely close Android Studio if you only want the AVD Manager.

现在,如果您只想要AVD Manager,则可以安全地关闭Android Studio。

From command line

If you want to use the command line you'll first need to create the virtual device using avdmanager, located under $ANDROID_HOME/tools/bin/avdmanager like so:

如果要使用命令行,首先需要使用位于$ ANDROID_HOME / tools / bin / avdmanager下的avdmanager创建虚拟设备,如下所示:

$ANDROID_HOME/tools/bin/avdmanager create avd --force --name testAVD --abi google_apis/x86_64 --package 'system-images;android-23;google_apis;x86_64'

After you created the device to emulate, then you need to open it with emulator, which is located under $ANDROID_HOME/tools/emulator. The command for the previously created device should be something like:

在创建要模拟的设备之后,您需要使用位于$ ANDROID_HOME / tools / emulator下的模拟器打开它。先前创建的设备的命令应该类似于:

emulator -avd testAVD

If it crashes saying something like...

如果它崩溃说像......

[140022905190208]:ERROR:./android/qt/qt_setup.cpp:28:Qt library not found at ../emulator/lib64/qt/lib

Ensure you're running the emulator command inside the $ANDROID_HOME/tools folder, otherwise won't work.

确保您在$ ANDROID_HOME / tools文件夹中运行模拟器命令,否则将无法运行。

If you already added a device VM you can list them all with

如果您已添加设备VM,则可以将它们全部列出

emulator -list-avds

Check out the official documentation for more details (thanks to Jeff Xiao -in comments).

查看官方文档了解更多详情(感谢Jeff Xiao -in评论)。

* The depreaction note says:

*沮丧说明说:

The android command is no longer available.
For manual SDK and AVD management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager

#3


27  

Use android avd to open the AVD Manager.

使用android avd打开AVD Manager。

#4


7  

For me, ./android avd worked, where android was the shell script under android-studio/sdk/tools.

对我来说,。/ android avd工作,其中android是android-studio / sdk / tools下的shell脚本。

#5


5  

./android avd is deprecated use ~/Android/Sdk/tools/bin/avdmanager --help instead!

./android avd不推荐使用〜/ Android / Sdk / tools / bin / avdmanager --help代替!

or if it is easier for you, move to the directory and use it like in the old version:

或者如果它更容易,请移动到目录并像旧版本一样使用它:

cd ~/Android/Sdk/tools/bin/
./avdmanager

cd~ / Android / Sdk / tools / bin / ./avdmanager

check new [options] with --help or -h before you use avdmanager

在使用avdmanager之前使用--help或-h检查新的[options]

first occurence in Android Studio 2.3 !

首次出现在Android Studio 2.3中!

#6


3  

It is just the android avd command, where the android shell script is in the tools/ directory of your SDK installation.

它只是android avd命令,其中android shell脚本位于SDK安装的tools /目录中。

#7


1  

Android studio:v3.0.1

Android studio:v3.0.1

Get name:

得到名字:

/home/user/Android/Sdk/tools$ android list avd

Start emulator:

启动模拟器:

/home/user/Android/Sdk/tools$ emulator -avd Nexus_6_API_23

#8


0  

I created shortcut with this command

我用这个命令创建了快捷方式

 /path/to/Android/emulator/emulator -avd Nexus_5X_API_26

Where "Nexus_5X_API_26" is my virtual device I created in Android Studio (2.3.3). Correct name can be checked from ~/.android/avd/ folder, where are one subfolder (with extension .avd) and one file (with extension .ini) for each. There are qcow2 files which I think could be also run directly with qemu (have not tested yet).

“Nexus_5X_API_26”是我在Android Studio(2.3.3)中创建的虚拟设备。可以从〜/ .android / avd /文件夹中检查正确的名称,其中每个子文件夹(扩展名为.avd)和一个文件(扩展名为.ini)。有qcow2文件,我认为也可以直接用qemu运行(尚未测试)。

#1


-3  

Here's the command-line usage for creating an AVD:

以下是创建AVD的命令行用法:

android create avd -n -t [- ] ...

android创建avd -n -t [ - ] ...

Example : android create avd -n my_android1.5 -t 2

示例:android create avd -n my_android1.5 -t 2

If the target you selected was a standard Android system image ("Type: platform"), the android tool next asks you whether you want to create a custom hardware profile.

如果您选择的目标是标准的Android系统映像(“类型:平台”),则android工具接下来会询问您是否要创建自定义硬件配置文件。

Android 1.5 is a basic Android platform. Do you wish to create a custom hardware profile [no]

Android 1.5是一个基本的Android平台。您是否希望创建自定义硬件配置文件[否]

Use the create avd command to create a new AVD, specifying the --skin option with a value that references either a default skin name (such as "WVGA800") or a custom skin resolution (such as 240x432). Here's an example:

使用create avd命令创建新的AVD,使用引用默认外观名称(例如“WVGA800”)或自定义外观分辨率(例如240x432)的值指定--skin选项。这是一个例子:

android create avd -n -t --skin WVGA800

android创建avd -n -t --skin WVGA800

or you can refer from :-

或者您可以参考: -

http://developer.android.com/tools/devices/managing-avds-cmdline.html

http://developer.android.com/tools/devices/managing-avds-cmdline.html

#2


35  

For thoose coming here because the android avd command has been deprecated*, here's how to do it now:

因为android avd命令已经被弃用了,所以来到这里,现在是如何做到的:

Using Android Studio

Open Android Studio with a valid studio project (if you don't have one, simply create one empty). After you've your project open, go to Tools => Android => AVD Manager. Note that this menu does not appear if you don't have a valid Android Studio project open.

使用有效的工作室项目打开Android Studio(如果没有,只需创建一个空)。打开项目后,转到Tools => Android => AVD Manager。请注意,如果您没有打开有效的Android Studio项目,则不会显示此菜单。

Now you can safely close Android Studio if you only want the AVD Manager.

现在,如果您只想要AVD Manager,则可以安全地关闭Android Studio。

From command line

If you want to use the command line you'll first need to create the virtual device using avdmanager, located under $ANDROID_HOME/tools/bin/avdmanager like so:

如果要使用命令行,首先需要使用位于$ ANDROID_HOME / tools / bin / avdmanager下的avdmanager创建虚拟设备,如下所示:

$ANDROID_HOME/tools/bin/avdmanager create avd --force --name testAVD --abi google_apis/x86_64 --package 'system-images;android-23;google_apis;x86_64'

After you created the device to emulate, then you need to open it with emulator, which is located under $ANDROID_HOME/tools/emulator. The command for the previously created device should be something like:

在创建要模拟的设备之后,您需要使用位于$ ANDROID_HOME / tools / emulator下的模拟器打开它。先前创建的设备的命令应该类似于:

emulator -avd testAVD

If it crashes saying something like...

如果它崩溃说像......

[140022905190208]:ERROR:./android/qt/qt_setup.cpp:28:Qt library not found at ../emulator/lib64/qt/lib

Ensure you're running the emulator command inside the $ANDROID_HOME/tools folder, otherwise won't work.

确保您在$ ANDROID_HOME / tools文件夹中运行模拟器命令,否则将无法运行。

If you already added a device VM you can list them all with

如果您已添加设备VM,则可以将它们全部列出

emulator -list-avds

Check out the official documentation for more details (thanks to Jeff Xiao -in comments).

查看官方文档了解更多详情(感谢Jeff Xiao -in评论)。

* The depreaction note says:

*沮丧说明说:

The android command is no longer available.
For manual SDK and AVD management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager

#3


27  

Use android avd to open the AVD Manager.

使用android avd打开AVD Manager。

#4


7  

For me, ./android avd worked, where android was the shell script under android-studio/sdk/tools.

对我来说,。/ android avd工作,其中android是android-studio / sdk / tools下的shell脚本。

#5


5  

./android avd is deprecated use ~/Android/Sdk/tools/bin/avdmanager --help instead!

./android avd不推荐使用〜/ Android / Sdk / tools / bin / avdmanager --help代替!

or if it is easier for you, move to the directory and use it like in the old version:

或者如果它更容易,请移动到目录并像旧版本一样使用它:

cd ~/Android/Sdk/tools/bin/
./avdmanager

cd~ / Android / Sdk / tools / bin / ./avdmanager

check new [options] with --help or -h before you use avdmanager

在使用avdmanager之前使用--help或-h检查新的[options]

first occurence in Android Studio 2.3 !

首次出现在Android Studio 2.3中!

#6


3  

It is just the android avd command, where the android shell script is in the tools/ directory of your SDK installation.

它只是android avd命令,其中android shell脚本位于SDK安装的tools /目录中。

#7


1  

Android studio:v3.0.1

Android studio:v3.0.1

Get name:

得到名字:

/home/user/Android/Sdk/tools$ android list avd

Start emulator:

启动模拟器:

/home/user/Android/Sdk/tools$ emulator -avd Nexus_6_API_23

#8


0  

I created shortcut with this command

我用这个命令创建了快捷方式

 /path/to/Android/emulator/emulator -avd Nexus_5X_API_26

Where "Nexus_5X_API_26" is my virtual device I created in Android Studio (2.3.3). Correct name can be checked from ~/.android/avd/ folder, where are one subfolder (with extension .avd) and one file (with extension .ini) for each. There are qcow2 files which I think could be also run directly with qemu (have not tested yet).

“Nexus_5X_API_26”是我在Android Studio(2.3.3)中创建的虚拟设备。可以从〜/ .android / avd /文件夹中检查正确的名称,其中每个子文件夹(扩展名为.avd)和一个文件(扩展名为.ini)。有qcow2文件,我认为也可以直接用qemu运行(尚未测试)。