Ionic构建错误:您尚未接受以下SDK组件的许可协议:[Android SDK Platform 24] [英] Ionic build error : You have not accepted the license agreements of the following SDK components: [Android SDK Platform 24]
问题描述
我试图运行命令 ionic build android --release
构建apk,但我收到此错误
I'm trying to run the command ionic build android --release
to build the apk but i am getting this error
总时间:1.767秒错误:cmd:命令失败,退出代码为1
错误输出:FAILURE:构建失败,出现异常。
Total time: 1.767 secs Error: cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.
-
出现错误:配置根项目android时出现问题。
What went wrong: A problem occurred configuring root project 'android'.
您尚未接受以下SDK组件的许可协议:[Android SDK Platform 24]。在构建项目
之前,您需要接受许可协议,并使用Android Studio SDK
Manager完成缺少的组件的
安装。或者,要了解如何将许可证
协议从一个工作站转移到另一个工作站,请转到
http://d.android.com/r/studio-ui/export-licenses.html
尝试:使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获取更多日志输出。已选取_JAVA_OPTIONS:-Xmx512M
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Picked up _JAVA_OPTIONS: -Xmx512M
推荐答案
安装许可证:
mkdir%ANDROID_HOME%\licenses
mkdir "%ANDROID_HOME%\licenses"
echo | set / p =8933bad161af4178b1185d1a37fbf41ea5269c55>
%ANDROID_HOME%\licenses\android-sdk-license
echo |set /p="8933bad161af4178b1185d1a37fbf41ea5269c55" > "%ANDROID_HOME%\licenses\android-sdk-license"
这篇关于Ionic构建错误:您尚未接受以下SDK组件的许可协议:[Android SDK Platform 24]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!