如何使用sdkmanager安装Android虚拟设备管理器和Intel系统映像
作者:互联网
我正在尝试仅使用命令行工具来创建android仿真器.
我已经下载了sdkmanager并成功安装了“平台”
sdkmanager“平台; android-25”.但是我无法安装系统映像,因为
sdkmanager –list给出了这个
system-images;a...ult;armeabi-v7a | 4 | ARM EABI v7a System Image
system-images;a...-10;default;x86 | 4 | Intel x86 Atom System Image
system-images;a...pis;armeabi-v7a | 5 | Google APIs ARM EABI v7a Syste...
有人认为我不需要查看要安装的软件包的全名.但是同时尝试从此列表中安装某些内容时,sdkmanager似乎却另有想法.
解决方法:
除了收到的评论之外,您还可以使用tools文件夹中的“ android”脚本,这是我的计算机上的输出(我已将输出截断了):
[user@pc:~/sdk/tools]
└─ $▶ ./android list sdk
******************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
*********************************************************************
"android" SDK commands can be translated to sdkmanager commands on a
best-effort basis.
Continue? (This prompt can be suppressed with the --use-sdk-wrapper
command-line argument
or by setting the USE_SDK_WRAPPER environment variable) [y/N]: y
Running /home/user/sdk/tools/bin/sdkmanager --list --verbose
Info: Parsing /home/user/sdk/build-tools/24.0.3/package.xml
Info: Parsing /home/user/sdk/build-tools/25.0.2/package.xml
Info: Parsing /home/user/sdk/emulator/package.xml
Info: Parsing /home/user/sdk/patcher/v4/package.xml
...
Info: Parsing /home/user/sdk/tools/package.xml
Warning: File /home/user/.android/repositories.cfg could not be loaded.
Installed packages:
--------------------------------------
build-tools;24.0.3
Description: Android SDK Build-Tools 24.0.3
Version: 24.0.3
Installed Location: /home/user/sdk/build-tools/24.0.3
build-tools;25.0.2
Description: Android SDK Build-Tools 25.0.2
Version: 25.0.2
Installed Location: /home/user/sdk/build-tools/25.0.2
...
system-images;android-25;google_apis;x86_64
Description: Google APIs Intel x86 Atom_64 System Image
Version: 4
为了确保我们在同一页面上:
>我已从this site下载文件tools_r25.2.3-linux.zip.将其解压缩到〜/ sdk中
>我使用工具/ sdkmanager安装了以下软件包:
构建工具; 24.0.3
构建工具/25.0.2
仿真器| 26.0.0
平台工具| 25.0.4
平台; android-24 | 2
平台; android-25 | 3
工具| 26.0.1
编辑:读取整个命令输出后,事实证明您还可以使用–verbose标志:
[user@pc:~/sdk/tools]
└─ $▶ sdkmanager --list --verbose
标签:android-sdk-manager,android 来源: https://codeday.me/bug/20191026/1934970.html