bug日记-缺少licences

作者: ifjgm | 来源:发表于2019-04-17 14:54 被阅读7次

    报错信息

    编译打包报错: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

    相关文章

      网友评论

        本文标题:bug日记-缺少licences

        本文链接:https://www.haomeiwen.com/subject/kslnwqtx.html