我在打包apk时出现如下错误提示:
FAILURE: Build failed with an exception.
A problem occurred configuring project ‘:app’.
Failed to install the following Android SDK packages as some licences have not been accepted.
platforms;android-28 Android SDK Platform 28
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
原因:没有获取到license的问题,请接受SDK许可协议并使用androidstudiosdk管理器安装缺少的组件。
解决方法:命令行,cd到Android sdk安装目录的tools\bin下,输入sdkmanager --update 不行的话就输入sdkmanager --licenses;
之后会出现如下:只要y即可,然后再打包就能成功。