问题描述:

执行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.的更多相关文章

  1. 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 ...

  2. [ubuntu]android SDK 与Gradle环境的安装与配置|搭建android基础开发/构建环境

    系统环境: linux:ubuntu18 已配置jdk 环境变量 切换到root账户 sudo su 安装Android-sdk (0)准备工作 切换到/usr/local目录: /usr/local ...

  3. 解决Android Studio Fetching Android SDK component information失败问题【转】

    本文转载自:http://blog.csdn.net/isesar/article/details/41908089 Android Studio 安装完成后,如果直接启动,Android Studi ...

  4. Android Studio 1.5启动出现“SDK Manager: failed to install”问题的解决

    问题描述 Android Studio 1.5是当前最新Android手机应用开发平台,下载bundle版安装后,启动Studio后出现“SDK Manager: failed to install” ...

  5. 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 ...

  6. Android开发 Failed to install *.apk on device 'emulator-5554': EOF

    在运行android 程序时出现这样的错误: Failed to install homework.apk on device 'emulator-5554': EOF java.io.IOExcep ...

  7. [转载]关于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同样的问题.怕 ...

  8. windows中android SDK manager安装更新sdk很慢,或者出现Done loading packages后不动甚至没有任何可用包

    出现问题: 1.windows中android SDK manager安装更新sdk很慢,或者出现Done loading packages后不动甚至没有任何可用包 2.Failed to fetch ...

  9. Android SDK content Loader has encountered a problem.parseSdkContent failed

    打开Eclipse,弹出Android SDK content Loader has encountered a problem.parseSdkContent failed,当点击detail按钮, ...

随机推荐

  1. pam_smb

    What is pam_smb? pam_smb is a PAM module/server which allows authentication of UNIX users using an N ...

  2. 【网络协议】动态主机配置协议DHCP

    动态主机配置协议DHCP 当某组织获得一块地址后,就可以为本组织内的主机或者路由器分配IP地址.这个分配工作可以由系统管理员手动通过网络管理工具来完成.也可以由动态主机配置协议(Dynamic Hos ...

  3. 内置函数 lambda sorted filter map 递归

    一 lambda 匿名函数 为了解决一些简单的需求而设计的一句话函数 # 计算 n 的 n次方 def func(n): return n**n print(func(10)) f = lambda ...

  4. 使用metamask钱包

    一.安装火狐浏览器metamask插件 打开火狐浏览器的附件组件,搜索metamask 点击第一个 点击“添加到Firefox” 添加成功后,浏览器右上角有一个狐狸标志 点击这个标志,打开插件 二.创 ...

  5. 美登杯”上海市高校大学生程序设计邀请赛 Problem E 、 小 花梨 的数组 (线段树)

    Problem E E . 小 花梨 的数组 时间限制:1000ms 空间限制:512MB Description 小花梨得到了一个长度为

  6. thinkphp方法success和error跳转时间以及返回ajax

    Action类的success和error方法第三个参数为数字时候,表示指定页面跳转时间,例如: $,); $,); 如果是ajax跳转 必须用true: $this->success('操作成 ...

  7. hive单机部署

    hadoop,hbase,zookeeper安装好了,现在来安装hive hadoop 版本:2.8.4 hbase 版本:2.1.3 hive 版本:2.3.4 zookeeper 版本:3.4.1 ...

  8. Linux常用命令type、date

    Linux命令类型: 内置命令(shell内置):cd is shell builtin 外部命令:命令 is /usr/bin/命令,在文件系统的某个路径下有一个与命令名称相应的可执行文件 type ...

  9. Python3-os模块详解

    import os # 返回一个目录的名称 print(os.path.basename("d:/python")) # 返回一个目录的目录名 print(os.path.dirn ...

  10. Python之抓取网页元素

    import urllib.request from bs4 import BeautifulSoup url = "http://www.wal-martchina.com/walmart ...