在 Ubuntu 中为 android 创建 AVD [英] create AVD for android in Ubuntu

查看:136
本文介绍了在 Ubuntu 中为 android 创建 AVD的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法使用以下命令创建 AVD.

I am not able to create AVD with the following command.

$ANDROID_HOME/tools/bin/avdmanager 创建 avd --name "test";-ksystem-images;android-25;google_apis;x86"

$ANDROID_HOME/tools/bin/avdmanager create avd --name "test" -k "system-images;android-25;google_apis;x86"

它抛出以下错误.

错误:包路径无效.有效的系统映像路径是:骨刺...

Error: Package path is not valid. Valid system image paths are:ository...

我有以下输出命令 $ANDROID_HOME/tools/bin/avdmanager list

id: 0 or "tv_1080p"
    Name: Android TV (1080p)
    OEM : Google
    Tag : android-tv
---------
id: 1 or "tv_720p"
    Name: Android TV (720p)
    OEM : Google
    Tag : android-tv
---------
id: 2 or "wear_round"
    Name: Android Wear Round
    OEM : Google
    Tag : android-wear
---------
id: 3 or "wear_round_chin_320_290"
    Name: Android Wear Round Chin
    OEM : Google
    Tag : android-wear
---------
id: 4 or "wear_square"
    Name: Android Wear Square
    OEM : Google
    Tag : android-wear
---------
id: 5 or "Galaxy Nexus"
    Name: Galaxy Nexus
    OEM : Google
---------
id: 6 or "Nexus 10"
    Name: Nexus 10
    OEM : Google
---------
id: 7 or "Nexus 4"
    Name: Nexus 4
    OEM : Google
---------
id: 8 or "Nexus 5"
    Name: Nexus 5
    OEM : Google
---------
id: 9 or "Nexus 5X"
    Name: Nexus 5X
    OEM : Google
---------
id: 10 or "Nexus 6"
    Name: Nexus 6
    OEM : Google
---------
id: 11 or "Nexus 6P"
    Name: Nexus 6P
    OEM : Google
---------
id: 12 or "Nexus 7 2013"
    Name: Nexus 7
    OEM : Google
---------
id: 13 or "Nexus 7"
    Name: Nexus 7 (2012)
    OEM : Google
---------
id: 14 or "Nexus 9"
    Name: Nexus 9
    OEM : Google
---------
id: 15 or "Nexus One"
    Name: Nexus One
    OEM : Google
---------
id: 16 or "Nexus S"
    Name: Nexus S
    OEM : Google
---------
id: 17 or "pixel"
    Name: Pixel
    OEM : Google
---------
id: 18 or "pixel_c"
    Name: Pixel C
    OEM : Google
---------
id: 19 or "pixel_xl"
    Name: Pixel XL
    OEM : Google
---------
id: 20 or "2.7in QVGA"
    Name: 2.7" QVGA
    OEM : Generic
---------
id: 21 or "2.7in QVGA slider"
    Name: 2.7" QVGA slider
    OEM : Generic
---------
id: 22 or "3.2in HVGA slider (ADP1)"
    Name: 3.2" HVGA slider (ADP1)
    OEM : Generic
---------
id: 23 or "3.2in QVGA (ADP2)"
    Name: 3.2" QVGA (ADP2)
    OEM : Generic
---------
id: 24 or "3.3in WQVGA"
    Name: 3.3" WQVGA
    OEM : Generic
---------
id: 25 or "3.4in WQVGA"
    Name: 3.4" WQVGA
    OEM : Generic
---------
id: 26 or "3.7 FWVGA slider"
    Name: 3.7" FWVGA slider
    OEM : Generic
---------
id: 27 or "3.7in WVGA (Nexus One)"
    Name: 3.7" WVGA (Nexus One)
    OEM : Generic
---------
id: 28 or "4in WVGA (Nexus S)"
    Name: 4" WVGA (Nexus S)
    OEM : Generic
---------
id: 29 or "4.65in 720p (Galaxy Nexus)"
    Name: 4.65" 720p (Galaxy Nexus)
    OEM : Generic
---------
id: 30 or "4.7in WXGA"
    Name: 4.7" WXGA
    OEM : Generic
---------
id: 31 or "5.1in WVGA"
    Name: 5.1" WVGA
    OEM : Generic
---------
id: 32 or "5.4in FWVGA"
    Name: 5.4" FWVGA
    OEM : Generic
---------
id: 33 or "7in WSVGA (Tablet)"
    Name: 7" WSVGA (Tablet)
    OEM : Generic
---------
id: 34 or "10.1in WXGA (Tablet)"
    Name: 10.1" WXGA (Tablet)
    OEM : Generic
Available Android targets:
----------
id: 1 or "android-25"
     Name: Android API 25
     Type: Platform
     API level: 25
     Revision: 3

我使用的是 ubuntu 16.04

I use ubuntu 16.04

附言

我是 Android 开发领域的新手.

I am very newbie in the field of Android Development.

推荐答案

这对我有用:

cd $ANDROID_HOME/tools/bin
./sdkmanager "system-images;android-25;google_apis;x86"
./sdkmanager --licenses
avdmanager create avd -n test -k "system-images;android-25;google_apis;x86"

这篇关于在 Ubuntu 中为 android 创建 AVD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆