问题描述:

执行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. Centos 安装 kubectl kubelet kubeadm

    cat <<EOF > /etc/yum.repos.d/kubernetes.repo [kubernetes] name=Kubernetes baseurl=https://m ...

  2. php查找判断二维数组中是否含有某个值

    $arr = array( array('a', 'b'), array('c', 'd') ); in_array('a', $arr); // 此时返回的永远都是 false deep_in_ar ...

  3. 接口数据转json格式

    接口数据转json格式 function tojson($result, $callback = null){ header('Content-Type:text/html; charset=utf- ...

  4. js创建对象的几种方式(工厂模式、构造函数模式、原型模式)

    普通方法创建对象 var obj = { name:"猪八戒", sayname:function () { alert(this.name); } } var obj1 = { ...

  5. iptables防火墙入门

    一.iptables基本管理 iptables运行前提:关闭firewalld防火墙再开启iptables,不然造成冲突. 基本指令: 1.部署iptables服务 yum –y install ip ...

  6. mysqldump 使用--tab=path参数时提示mysqldump: Got error: 1290: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement when executing 'SELECT INTO OUTFILE'

    报错: [root@zedu test]# mysqldump -h127.0.0.1 -uroot -p --single-transaction --add-drop-database --tab ...

  7. axios时遇到的Request Method: OPTIONS

    前言 在请求axios 请求数据的时候,会出现options的,是因为请求是分为简单请求和复杂请求. 简单请求 满足下面两个条件的请求是简单请求: 请求方式是以下三种之一: HEAD GET POST ...

  8. C# 学习第二天笔记

    1. Convert 类型转换 数据类型不兼容的需要转换时,使用Convert转换.转成什么类型就to谁 例: string--> int string a=“b” Int  c= Conver ...

  9. React-native 触摸事件

    http://www.360doc.com/content/16/0711/23/34978982_574835465.shtml

  10. luogu3812 【模板】线性基

    Code: #include <cstdio> #include <algorithm> #define ll long long #define N 64 #define s ...