bug日记-缺少licences

报错信息

编译打包报错:Android SDK packages as some licences have not been accepted

报错信息如下
Failed to install the following Android SDK packages as some licences have not been accepted.
     build-tools;28.0.2 Android SDK Build-Tools 28.0.2
  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

分析

明显缺少 build-tools;28.0.2licenses

升级 licenses

  • 首先这肯定是 sdk 包里缺少对应 licenses,命令如下
sdkmanager --update && yes | sdkmanager --licenses

总结

  • 首先sdkmanager 等命令行工具在 sdk 的tools/bin
  • 使用 sdkmanager 升级命令获取 licenses
    原文作者:ifjgm
    原文地址: https://www.jianshu.com/p/82064be540e8
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞