How to open the AVD manager on Ubuntu Linux from t

2020-01-27 03:48发布

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

10条回答
一纸荒年 Trace。
2楼-- · 2020-01-27 04:36

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

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

Example : 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 1.5 is a basic Android platform. Do you wish to create a custom hardware profile [no]

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:

android create avd -n -t --skin WVGA800

or you can refer from :-

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

查看更多
淡お忘
3楼-- · 2020-01-27 04:36

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

查看更多
Juvenile、少年°
4楼-- · 2020-01-27 04:37

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).

查看更多
贪生不怕死
5楼-- · 2020-01-27 04:38

Sadly android sdk and android avd stops working I used only command line tools:

  1. Download sdk-tools-linux (tar.gz) from:

https://developer.android.com/studio#downloads

  1. Unpack tools to : ...android-sdk/tools (...wherever you want)

  2. Go to : android-sdk/tools/bin

  3. Install needed sdk libraries:

Execute in cmd

sdkmanager --update

sdkmanager "platform-tools" "platforms;android-29" 

sdkmanager "build-tools;29.0.1" "extras;android;m2repository" "tools"

sdkmanager "system-images;android-29;google_apis_playstore;x86_64"

sdkmanager "emulator"
  1. Setup environment variables

edit ~/.bashrc

export ANDROID_HOME=../android-sdk

export ANDROID_SDK_ROOT=$ANDROID_HOME

export PATH=$PATH:$ANDROID_SDK_ROOT/tools/bin

alias emulator="sh $ANDROID_HOME/tools/emulator"

Restart to take .bashrc

  1. Create device:

Go to /bin

avdmanager create avd -n myDevice -k "system-images;android-29;google_apis_playstore;x86_64"
  1. run device:

    cd android-sdk/tools

    emulator -avd myDevice

Issues:

qemu emulator not found in /bin....

cd android-sdk/tools/bin
ln -s  android-sdk/emulator/ emulator
查看更多
登录 后发表回答