Jenkins:您尚未接受以下SDK组件的许可协议

Jenkins: You have not accepted the license agreements of the following SDK components

我已经下载 adt-bundle-windows-x86_64-20130219 并在 Android SDK 根目录中应用 $ANDROID_HOME/sdk 在 Jenkins 配置系统中。

我的错误是:

 * What went wrong:
 A problem occurred configuring project ':app'.
 > You have not accepted the license agreements of the following SDK 
 components:
 [Android SDK Build-Tools 25.0.2, 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

我在 $ANDROID_HOME/tools/bin 看到了很多我需要 运行 ./sdkmanager --licenses 的教程。但真正的问题是我的 adt-bundle 中没有 BIN。这是我的目录:C:\Users\user\Desktop\Gradle\adt-bundle-windows-x86_64-20130219\sdk\tools。 bin 文件夹不见了,我没有。我是否下载了错误的 sdk 工具?我还 运行 SDK 管理器,不幸的是工具中缺少 bin 文件夹。

JENKINS 作业中的其他信息: 我只是调用 gradle 脚本并添加任务:packageDebug

已解决。

步骤:

  1. 在android工作室网站下载sdk工具
  2. 创建一个文件夹,然后将 sdk 解压到该文件夹​​中
  3. 转到tools/bin目录
  4. 转到该目录中的 CMD,然后键入 ./sdkmanager.bat --licenses
  5. 每次他们向您询问许可时,只需按 y