Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
584 views
in Technique[技术] by (71.8m points)

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

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

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.

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

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 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:

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 may not work.

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

emulator -list-avds

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

* 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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...