cordova打包apk时出错Failed to install the following Android SDK packages as some licences have not been a

我在打包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即可,然后再打包就能成功。
在这里插入图片描述

发布了9 篇原创文章 · 获赞 0 · 访问量 156

猜你喜欢

转载自blog.csdn.net/qq_41942913/article/details/103764235