问题描述:

执行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命令,就执行成功了:

最新文章

  1. 20145212&20145204信息安全系统实验四报告
  2. 横版CG场景
  3. My97DatePickerBeta 日历插件
  4. Java构建工具Ant小记(一)
  5. Nancy 引用源码与NuGet安装差异
  6. java常用集合详解 contains
  7. android post请求
  8. C# Hook钩子实例代码之截取键盘输入,需要的朋友可以参考下
  9. BNUOJ-26586 Simon the Spider 最小生成树+枚举
  10. [bzoj2957][楼房重建] (线段树)
  11. MVVMLight 1:MVVMLight介绍以及在项目中的使用
  12. ‘true’==true返回false详解
  13. hdu 3642 Get The Treasury
  14. 安装bootcamp时提示“找不到$winpedriver$文件夹,请验证该文件夹是否和bootcamp处于同一文件夹内?”
  15. 在postgresqlz中查看与删除索引
  16. 细说SVN集中式版本控制器
  17. java,arduino,C#之间的一些编码转换
  18. Go_17:GoLang中如何使用多参数属性传参
  19. 第一章 Java常用的并发类
  20. zabbix debug and vulnerability https://www.zabbix.com/documentation/3.0/manual/concepts/sender

热门文章

  1. 如何设置树莓派 -Zero 自启动连接WIFI
  2. 关于MySQL服务无法正常启动问题
  3. 在python中,用默认参数(list,set,dict...)时要小心
  4. API开发之接口安全(一)----生成sign
  5. JSON跨域读取那点事(JSONP跨域访问)
  6. ASP.netMVC验证码
  7. poj1734 Sightseeing trip[最小环]
  8. vue组件开发练习--焦点图切换
  9. redis主从配置及其java的调用(转)
  10. 04 vue-cli 脚手架、webpack-simple模板项目生成、组件使用