发布打包生成apk的时候,构建成功,但编译失败,是什么原因?

报错日志如下:

Checking the license for package Android SDK Build-Tools 26.0.2 in D:\cocos\cocos\Android-SDK\licenses
Warning: License for package Android SDK Build-Tools 26.0.2 not accepted.

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ‘:libcocos2dx’.

You have not accepted the license agreements of the following SDK components:
[Android SDK Build-Tools 26.0.2].
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

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 3s
执行命令出错,返回值:1。

同问,我也遇到这个问题了, 没有人见过吗?

这个是新版本的吧?3.17?如果是的话,把安卓编译工具更新一下。新版本使用的编译方法和旧版本不同

同问,一样的问题,Cocos2d就可以正常打包android