Android应用构建:13:使用sdkmanager自动接受license的方法
发布日期:2021-06-30 20:16:00
浏览次数:2
分类:技术文章
本文共 1822 字,大约阅读时间需要 6 分钟。
使用sdkmanager, 需要手工输入y已确认接受license才能继续之后的安装,这篇文章介绍自动接受license的方式和写法。问题现象
在使用sdkmanager安装sdk时,会又如下需要输入y接受license的过程,而如果希望全程无手工干预,比如此部分写在Dockerfile之中,则无法进行下一步安装,因为需要首先接受license才能继续安装。
[root@liumiaocn bin]# ./sdkmanager platform-tools "platforms;android-29" "build-tools;29.0.2"License android-sdk-license: ] 10% Computing updates... ---------------------------------------Terms and Conditions...省略14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.January 16, 2019---------------------------------------Accept? (y/N): y[=======================================] 100% Unzipping... platform-tools/systr[root@liumiaocn bin]#
不做处理的Dockerfile的构建结果失败信息可能如下所示
Accept? (y/N): Skipping following packages as the license is not accepted:Android SDK Platform-ToolsAndroid SDK Build-Tools 29.0.2Android SDK Platform 29The following packages can not be installed since their licenses or those of the packages they depend on were not accepted: platforms;android-29 build-tools;29.0.2 platform-tools
对应方法
执行命令:yes | sdkmanager --licenses
执行时会显示如下信息,可自动接受license,不再需要手动输入y。
Accept? (y/N): All SDK package licenses accepted[=======================================] 100% Unzipping... platform-tools/systr
此种对应方式是在如下文章中获取并确认的方法:
- https://discuss.circleci.com/t/android-platform-28-sdk-license-not-accepted/27768
转载地址:https://liumiaocn.blog.csdn.net/article/details/103638793 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
很好
[***.229.124.182]2024年04月12日 00时30分00秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
数据结构之线性链表
2019-04-30
JQuery使用validate插件完成校验
2019-04-30
关于java的继承
2019-04-30
关于java的内部类
2019-04-30
关于java的枚举
2019-04-30
一个简单的layui登陆界面
2019-04-30
SQL考试常见题目
2019-04-30
使用Spring Boot写一个简单的Hello World
2019-04-30
Spring Boot整合Servlet使用
2019-04-30
SpringBoot 文件上传
2019-04-30
我居然在Github上找到了一个完整的停车系统(附源码地址)
2019-04-30
大厂经典面试题:Redis为什么这么快?
2019-04-30
精通Spring?请吃我一狗腿!
2019-04-30
培训班老师说可以用这个干掉一大批面试者
2019-04-30
靠这本,在某宝花了399大洋的宝典,熬夜七天,吊打面试官,终进大厂
2019-04-30
阿里四面,居然栽在一道排序算法上
2019-04-30
【Java编码规范】《阿里巴巴Java开发手册(正式版)》发布!
2019-04-30
如何在二三线城市月薪过万(一)看完这篇后端简历优化,包你面试不断
2019-04-30