【问题标题】:create and activate avd for android in command line inside docker在 docker 内的命令行中为 android 创建和激活 avd
【发布时间】:2016-04-09 13:11:27
【问题描述】:

我在我的 docker 上运行 android,我需要使用 AVD 来运行。每当我尝试创建和运行 avd 时,我都会收到错误

Valid ABIs: no ABIs.
Error: Invalid --abi armeabi-v7a for the selected target.

我尝试安装 ABI,但它似乎无法正常工作。问题是我应该使用命令行来完成整个步骤。并且android sdk版本是android-sdk_r24.4.1。我试过this 并没有为我工作。如果有人来伸出援助之手,那就太好了。将不胜感激。

【问题讨论】:

    标签: android command-line automation automated-tests avd


    【解决方案1】:

    运行下一个命令以查看可供下载的模拟器架构图像:

    android list sdk --all --extended

    ----------
    id: 45 or "sys-img-armeabi-v7a-android-tv-23"
         Type: SystemImage
         Desc: Android TV ARM EABI v7a System Image
               Revision 3
               Requires SDK Platform Android API 23
    ----------
    id: 46 or "sys-img-x86-android-tv-23"
         Type: SystemImage
         Desc: Android TV Intel x86 Atom System Image
               Revision 3
               Requires SDK Platform Android API 23
    ----------
    id: 47 or "sys-img-armeabi-v7a-android-wear-23"
         Type: SystemImage
         Desc: Android Wear ARM EABI v7a System Image
               Revision 3
               Requires SDK Platform Android API 23
    ----------
    id: 48 or "sys-img-x86-android-wear-23"
         Type: SystemImage
         Desc: Android Wear Intel x86 Atom System Image
               Revision 3
               Requires SDK Platform Android API 23
    ----------
    id: 49 or "sys-img-armeabi-v7a-android-23"
         Type: SystemImage
         Desc: ARM EABI v7a System Image
               Revision 3
               Requires SDK Platform Android API 23
    ----------
    id: 50 or "sys-img-x86_64-android-23"
         Type: SystemImage
         Desc: Intel x86 Atom_64 System Image
               Revision 9
               Requires SDK Platform Android API 23
    ----------
    id: 51 or "sys-img-x86-android-23"
         Type: SystemImage
         Desc: Intel x86 Atom System Image
               Revision 9
               Requires SDK Platform Android API 23
    ----------
    id: 52 or "sys-img-armeabi-v7a-google_apis-23"
         Type: SystemImage
         Desc: Google APIs ARM EABI v7a System Image
               Revision 14
               Requires SDK Platform Android API 23
    ----------
    id: 53 or "sys-img-x86_64-google_apis-23"
         Type: SystemImage
         Desc: Google APIs Intel x86 Atom_64 System Image
               Revision 14
               Requires SDK Platform Android API 23
    ----------
    id: 54 or "sys-img-x86-google_apis-23"
         Type: SystemImage
         Desc: Google APIs Intel x86 Atom System Image
               Revision 14
               Requires SDK Platform Android API 23
    

    使用下一条命令下载所需的图像:

    echo y | android update sdk --all --no-ui --filter "sys-img-armeabi-v7a-google_apis-23"

    下载后运行下一条命令查看可用目标:

    android list targets

    id: 5 or "Google Inc.:Google APIs:23"
         Name: Google APIs
         Type: Add-On
         Vendor: Google Inc.
         Revision: 1
         Description: Android + Google APIs
         Based on Android 6.0 (API level 23)
         Libraries:
          * com.android.future.usb.accessory (usb.jar)
              API for USB Accessories
          * com.google.android.media.effects (effects.jar)
              Collection of video effects
          * com.google.android.maps (maps.jar)
              API for Google Maps
         Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in
     Tag/ABIs : google_apis/x86
    

    在创建模拟器图像时放置所需的标签/abi:

    echo "no" | android -v create avd --force -n arm -t "android-23" --abi "google_apis/armeabi-v7a"

    Google 将默认标签/api 从一个版本更改为另一个版本,并将播放服务图像转换为不同的名称,因此您必须运行并仔细检查上述命令的输出才能看到实际图片。希望对您有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-04-30
      • 2011-07-29
      • 1970-01-01
      • 2023-03-18
      • 2019-08-24
      • 2019-01-11
      • 2011-04-02
      • 2023-03-07
      相关资源
      最近更新 更多