【发布时间】:2017-08-21 06:46:14
【问题描述】:
我正在从事 Ionic3 项目。使用cordova build android 构建应用程序时显示此错误
FAILURE:构建失败并出现异常。
* What went wrong:
A problem occurred configuring root project 'android'.
> You have not accepted the license agreements of the following SDK components:
[Android SDK Build-Tools 26.0.1, Android SDK Platform 25].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
我已关注与此类错误相关的 stackoverflow 答案。但它仍然显示此错误
我已按照以下程序来克服错误。
- 成功添加
ANDROID_HOME目录 -
使用以下命令接受所有许可证
./sdkmanager --licenses
在($ANDROID_HOME/Android/Sdk/tools/bin)目录
发生此错误的主要问题是什么? 如何克服这个问题? 有没有其他方法可以解决这个问题?
【问题讨论】:
-
@Niroshan8889 打开您的 android sdk 管理器并安装 Android SDK Build-Tools 26.0.1 和 Android SDK Platform 25。安装时您必须手动接受许可,应该这样做
-
我已经成功安装了sdk工具,但错误仍然存在
-
This answer 解决了这个问题。
标签: android cordova gradle ionic2 android-gradle-plugin