Linux下命令行安装配置android sdk
2023-03-07 09:42:50 时间
首先, 你得有个VPN
参考以下三篇完成Android SDK的安装
https://www.digitalocean.com/community/tutorials/how-to-build-android-apps-with-jenkins
http://stackoverflow.com/questions/4681697/is-there-a-way-to-automate-the-android-sdk-installation
http://developer.android.com/sdk/installing/adding-packages.html
首先到 https://developer.android.com/sdk/index.html 下载SDK Tools Only, 我下的是 android-sdk_r24.1.2-linux.tgz
在linux里解压缩, 用于下载组件的是tools/android. 参数说明
Action "update sdk": Updates the SDK by suggesting new platforms to install if available. Options: -f --force Forces replacement of a package or its parts, even if something has been modified -u --no-ui Updates from command-line (does not display the GUI) -o --obsolete Installs obsolete packages -t --filter A filter that limits the update to the specified types of packages in the form of a comma-separated list of [platform, tool, platform-tool, doc, sample, extra] -s --no-https Uses HTTP instead of HTTPS (the default) for downloads -n --dry-mode Simulates the update but does not download or install anything
查看可用的组件
android list sdk --all
会得到一个类似以下的列表, 把要下载的序号记下来
1- Android SDK Tools, revision 24.1.2 2- Android SDK Platform-tools, revision 22 3- Android SDK Build-tools, revision 22.0.1 4- Android SDK Build-tools, revision 22 (Obsolete) 5- Android SDK Build-tools, revision 21.1.2 6- Android SDK Build-tools, revision 21.1.1 (Obsolete) 7- Android SDK Build-tools, revision 21.1 (Obsolete) 8- Android SDK Build-tools, revision 21.0.2 (Obsolete) 9- Android SDK Build-tools, revision 21.0.1 (Obsolete) 10- Android SDK Build-tools, revision 21 (Obsolete) 11- Android SDK Build-tools, revision 20 12- Android SDK Build-tools, revision 19.1 13- Android SDK Build-tools, revision 19.0.3 (Obsolete) 14- Android SDK Build-tools, revision 19.0.2 (Obsolete) 15- Android SDK Build-tools, revision 19.0.1 (Obsolete) 16- Android SDK Build-tools, revision 19 (Obsolete) 17- Android SDK Build-tools, revision 18.1.1 (Obsolete) 18- Android SDK Build-tools, revision 18.1 (Obsolete) 19- Android SDK Build-tools, revision 18.0.1 (Obsolete) 20- Android SDK Build-tools, revision 17 (Obsolete) 21- Documentation for Android SDK, API 22, revision 1 22- SDK Platform Android 5.1.1, API 22, revision 2 23- SDK Platform Android 5.0.1, API 21, revision 2 24- SDK Platform Android 4.4W.2, API 20, revision 2 25- SDK Platform Android 4.4.2, API 19, revision 4 26- SDK Platform Android 4.3.1, API 18, revision 3 27- SDK Platform Android 4.2.2, API 17, revision 3
下载需要的组件, 注意--all 这个参数一定要加上, 否则后面filter里的序号不起作用, 例如我用的是
android update sdk -u --all --filter 1,2,3,5,11,12,22,23,24,25,26,27,28,29,88,89
然后等待其安装完成就可以了
相关文章
- 在 Go 里用 CGO?这 7 个问题你要关注!
- 9款优秀的去中心化通讯软件 Matrix 的客户端
- 求职数据分析,项目经验该怎么写
- 在OKR中,我看到了数据驱动业务的未来
- 火山引擎云原生大数据在金融行业的实践
- OpenHarmony富设备移植指南(二)—从postmarketOS获取移植资源
- 《数据成熟度指数》报告:64%的企业领袖认为大多数员工“不懂数据”
- OpenHarmony 小型系统兼容性测试指南
- 肯睿中国(Cloudera):2023年企业数字战略三大趋势预测
- 适用于 Linux 的十大命令行游戏
- GNOME 截图工具的新旧截图方式
- System76 即将推出的 COSMIC 桌面正在酝酿大变化
- 2GB 内存 8GB 存储即可流畅运行,Windows 11 极致精简版系统 Tiny11 发布
- 迎接 ecode:一个即将推出的具有全新图形用户界面框架的现代、轻量级代码编辑器
- loongarch架构介绍(三)—地址翻译
- Go 语言怎么解决编译器错误“err is shadowed during return”?
- 敏捷:可能被开发人员遗忘的部分
- Denodo预测2023年数据管理和分析的未来
- 利用数据推动可持续发展
- 在 Vue3 中实现 React 原生 Hooks(useState、useEffect),深入理解 React Hooks 的