Failed to install the following Android SDK packages as some licences have not been accepted.
问题描述:
执行gradle tasks报错:
gradle tasks > Configure project :app
Exception while marshalling /usr/local/android-home/android-sdk-linux/build-tools/28.0./package.xml. Probably the SDK is read-only
Exception while marshalling /usr/local/android-home/android-sdk-linux/build-tools/29.0./package.xml. Probably the SDK is read-only
Exception while marshalling /usr/local/android-home/android-sdk-linux/platform-tools/package.xml. Probably the SDK is read-only
Exception while marshalling /usr/local/android-home/android-sdk-linux/platforms/android-/package.xml. Probably the SDK is read-only
Exception while marshalling /usr/local/android-home/android-sdk-linux/platforms/android-/package.xml. Probably the SDK is read-only
Exception while marshalling /usr/local/android-home/android-sdk-linux/tools/package.xml. Probably the SDK is read-only > Configure project :picture_library
Exception while marshalling /usr/local/android-home/android-sdk-linux/build-tools/28.0./package.xml. Probably the SDK is read-only
Exception while marshalling /usr/local/android-home/android-sdk-linux/build-tools/29.0./package.xml. Probably the SDK is read-only
Exception while marshalling /usr/local/android-home/android-sdk-linux/platform-tools/package.xml. Probably the SDK is read-only
Exception while marshalling /usr/local/android-home/android-sdk-linux/platforms/android-/package.xml. Probably the SDK is read-only
Exception while marshalling /usr/local/android-home/android-sdk-linux/platforms/android-/package.xml. Probably the SDK is read-only
Exception while marshalling /usr/local/android-home/android-sdk-linux/tools/package.xml. Probably the SDK is read-only
Checking the license for package Android SDK Build-Tools 28.0. in /usr/local/android-home/android-sdk-linux/licenses
Warning: License for package Android SDK Build-Tools 28.0. not accepted. FAILURE: Build failed with an exception. * What went wrong:
A problem occurred configuring project ':picture_library'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
build-tools;28.0. Android SDK Build-Tools 28.0.
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html Using Android SDK: /usr/local/android-home/android-sdk-linux * Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 1s
分析错误信息:
Failed to install the following Android SDK packages as some licences have not been accepted.
build-tools;28.0. Android SDK Build-Tools 28.0.
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
得到以下结论:
构建当前的项目缺少下面的android sdk
所以下载这个sdk即可:
build-tools;28.0. Android SDK Build-Tools 28.0.
解决办法:
使用android命令 列出sdk相关的列表,以便我们选择和自己项目匹配的SDK版本
android list sdk --all
输出如下所示:

从上图可以看出,Android SDK Build-Tools 28.0.2对应的序号是7,使用android update命令安装:
android update sdk -u -a -t
安装完成:

再次在app目录下,测试gradle clean命令,就执行成功了:

Failed to install the following Android SDK packages as some licences have not been accepted.的更多相关文章
- Failed to load C:\ProgramFilesTwo\Android\sdk\build-tools\27.0.3\lib\dx.jar
Eclipse遇到如下错误: Failed to load C:\ProgramFilesTwo\Android\sdk\build-tools\27.0.3\lib\dx.jar 原因: eclip ...
- [ubuntu]android SDK 与Gradle环境的安装与配置|搭建android基础开发/构建环境
系统环境: linux:ubuntu18 已配置jdk 环境变量 切换到root账户 sudo su 安装Android-sdk (0)准备工作 切换到/usr/local目录: /usr/local ...
- 解决Android Studio Fetching Android SDK component information失败问题【转】
本文转载自:http://blog.csdn.net/isesar/article/details/41908089 Android Studio 安装完成后,如果直接启动,Android Studi ...
- Android Studio 1.5启动出现“SDK Manager: failed to install”问题的解决
问题描述 Android Studio 1.5是当前最新Android手机应用开发平台,下载bundle版安装后,启动Studio后出现“SDK Manager: failed to install” ...
- Cannot find `aapt.exe`. Please install the Android SDK Build-tools package
Google has updated their SDK tools ("Android SDK Tools" Rev. 23) in a way that also requir ...
- Android开发 Failed to install *.apk on device 'emulator-5554': EOF
在运行android 程序时出现这样的错误: Failed to install homework.apk on device 'emulator-5554': EOF java.io.IOExcep ...
- [转载]关于android SDK安装Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list-1.xml出错
原文地址为:http://blog.csdn.net/springsky_/article/details/7442388 因为入行移动测试,所以很多测试环境的搭建.从中遇到了和这个GG同样的问题.怕 ...
- windows中android SDK manager安装更新sdk很慢,或者出现Done loading packages后不动甚至没有任何可用包
出现问题: 1.windows中android SDK manager安装更新sdk很慢,或者出现Done loading packages后不动甚至没有任何可用包 2.Failed to fetch ...
- Android SDK content Loader has encountered a problem.parseSdkContent failed
打开Eclipse,弹出Android SDK content Loader has encountered a problem.parseSdkContent failed,当点击detail按钮, ...
随机推荐
- 4G LTE 网只能提供数据服务,不能承载语音通话,该怎么理解?
转:http://www.qbiao.com/16776.html 这个问题要从移动核心网的角度来理解.我们平时说的WCDMA.TD-SCDMA.TD-LTE其实通常指空口技术,即从手机到基站的通信技 ...
- 逆向破解H.Koenig 遥控器 Part 2
逆向破解H.Koenig 遥控器 Part 2 到目前为止,我们已经知道了RF收发器的安装过程,下面是我们所掌握的东西 : l 无线电收发器是一个Avantcom A7105 l 调制是FSK l 频 ...
- deep_learning_凹凸函数
什么是凸函数及如何判断一个函数是否是凸函数 t元j 一.什么是凸函数 对于一元函数f(xf(x),如果对于任意tϵ[0,1]tϵ[0,1]均满足:f(tx1+(1−t)x2)≤tf(x1)+(1−t) ...
- idea中添加mybatis mapper 样例
代码: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC &quo ...
- python wechat
Python _ithcat持续登陆问题(itchat.auto_login(hotReload=True) https://blog.csdn.net/weixin_43886198/article ...
- Mybatis 解决问题的记录与博客
问题:mybatis 空值映射的问题Mybatis在使用resultMap来映射查询结果中的列,如果查询结果中包含空值的列(不是null),则Mybatis在映射的时候,不会映射这个字段 https: ...
- Hadoop下MapReduce实现Pi值的计算
Hadoop自带的例子中,有一个计算Pi值的例子. 这个程序的原理是这样的.假如有一个边长为1的正方形.以正方形的一个端点为圆心,以1为半径,画一个圆弧,于是在正方形内就有了一个直角扇形.在正方形里随 ...
- SpringBoot项目中,Mybatis的使用
项目中使用MyBatis的地方很少,可以说是基本不用,慕课网上面这个项目介绍给也就是一些比较简单的使用例子,我用JPA比较的多,MyBatis有两种使用方式 1.导入MyBatis的依赖 <de ...
- poj 3069 贪心+区间问题
Saruman's Army Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5989 Accepted: 3056 De ...
- 图论小专题A
大意失荆州.今天考试一到可以用Dijkstra水过的题目我竟然没有做出来,这说明基础还是相当重要.考虑到我连Tarjan算法都不太记得了,我决定再过一遍蓝皮书,对图论做一个小的总结.图论这个部分可能会 ...