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.2
的licenses
升級licenses
-
首先這肯定是 sdk 包裡缺少對應
licenses
,命令如下
sdkmanager --update && yes | sdkmanager --licenses
-
sdkmanager
命令路徑在 sdk 安裝路徑的tools/bin
下 - sdkmanager 官方介紹
總結
-
首先
sdkmanager
等命令列工具在sdk 的tools/bin
-
使用
sdkmanager
升級命令獲取 licenses