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按钮, ...
随机推荐
- linux工具之lsof
1.lsof ( list open files) lsof(list open files) 是一个列出当前系统打开文件的工具.在linux环境下,任何事物都以文件的形式存在,通 ...
- c++四种分配内存的方法整理
1 calloc 函数: void *calloc(unsigned int num, unsigned int size) 按照所给的数据个数和数据类型所占字节数,分配一个 num * size 连 ...
- 查看是否用GPU跑的TensorFlow程序
查看是否用GPU跑的TensorFlow程序 第一种方法,直接输出日志法(推荐) import tensorflow as tf sess = tf.Session(config=tf.ConfigP ...
- Redis03——Redis架构
Redis架构 1.1.问题 redis是单线程,单实例,为什么并发那么多,依旧很快呢? 回答:因为调用了系统内核的epoll 1.2.Linux的早期版本 Linux有Linux kernal,我们 ...
- MHA原理
MHA工作原理 主库挂了,但是主库的binlog都被全部从库接收,此时会选中应用binlog最全的一台从库作为新的主库,其他从主只需要重新指定一下主库即可(因为此时,所有从库都是一致的,所以只需要重新 ...
- mysql下优化表和修复表命令(repair table、optimize table)
随着mysql的长期使用,肯定会出现一些问题,一般情况下mysql表无法访问,就可以修复表了,优化时减少磁盘占用空间,方便备份. repair table table_name //修复表 optim ...
- 浅析jsp
什么是jsp?jsp的全称是 java Server Page ,也就是俗称的动态网页,什么是静态网页和动态网页呢,在我理解看来,HTML等网页就属于静态网页,jsp等网页属于动态网页,为什么这么说呢 ...
- SpringBoot 如何实现自动配置
SpringMVC 和 SpringBoot 都是基于Spring的,两者推出的时间相差不大,只不过是SpringMVC推出早点. 关于两者,最近看到一个比较通俗的讲法: Spring 最初利用“工厂 ...
- (web)个人项目(挖宝网)
前台:使用bootstrap. 后台:使用layui. 数据库:mysql 下载地址:https://github.com/oukele/wabaowangDemo(数据库文件忘记上传,我在展示功能结 ...
- BZOJ 1984: 月下“毛景树” (树链剖分+线段树)
注意赋值和加法的标记下传优先级.具体看代码. CODE #include <vector> #include <queue> #include <cstdio> # ...