本文翻译自:You have not accepted the license agreements of the following SDK components [duplicate]

This question already has an answer here: 这个问题已经在这里有了答案:

  • Automatically accept all SDK licences 42 answers 自动接受所有SDK许可证 42个答案

I downloaded the latest Android SDK tools version 24.4.1. 我下载了最新的Android SDK工具版本24.4.1。 I used the command line to install SDKs. 我使用命令行来安装SDK。 I typed y when asked 当系统询问时我输入了y

Do you accept the license 'android-sdk-license-c81a61d9' [y/n]: y after that install succeeded. 成功安装后,您是否接受许可证'android-sdk-license-c81a61d9'[y / n]:y。

But when using Gradle 3.1 to build, the follows shows up 但是当使用Gradle 3.1进行构建时,将显示以下内容

You have not accepted the license agreements of the following SDK components: [Android SDK Platform 23, Android SDK Build-Tools 23.0.1]. 您尚未接受以下SDK组件的许可协议:[Android SDK Platform 23,Android SDK Build-Tools 23.0.1]。 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. 在构建项目之前,您需要接受许可协议并使用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 另外,要了解如何将许可协议从一个工作站转移到另一个工作站,请访问http://d.android.com/r/studio-ui/export-licenses.html

I checked ~/.android and /opt/android-sdk where Android tools are put. 我检查了放置Android工具的~/.android/opt/android-sdk Neither contain folder named licenses . 都不包含名为licenses文件夹。


#1楼

参考:https://stackoom.com/question/2gpR6/您尚未接受以下SDK组件的许可协议-重复


#2楼

I solved the problem by opening the Android SDK Manager and installing the SDK build tools for the version it is complaining about (API 24). 我通过打开Android SDK Manager并为其抱怨的版本(API 24)安装SDK生成工具来解决了该问题。

I had also updated using the command line previously and I suspect the Android SDK Manager has a more complete way of resolving dependencies, including the license. 我以前也使用命令行进行过更新,我怀疑Android SDK Manager具有解决依赖关系(包括许可证)的更完整方法。


#3楼

You can install and accept the license of the SDK & tools via 2 ways: 您可以通过两种方式安装和接受SDK和工具的许可证:

1. Open the Android SDK Manager GUI via command line 1.通过命令行打开Android SDK Manager GUI

Open the Android SDK manager via the command line using: 使用以下命令通过命令行打开Android SDK管理器:

# Android SDK Tools 25.2.3 and lower - Open the Android SDK GUI via the command line
cd ~/Library/Android/sdk/tools && ./android# 'Android SDK Tools' 25.2.3 and higher - `sdkmanager` is located in android_sdk/tools/bin/.
cd ~/Library/Android/sdk/tools/bin && ./sdkmanager

View more details on the new sdkmanager . 查看有关新sdkmanager更多详细信息 。

Select and install the required tools. 选择并安装所需的工具。 (your location may be different) (您的位置可能有所不同)

2. Install and accept android license via command line: 2.通过命令行安装并接受android许可证:

Update the packages via command line, you'll be presented with the terms and conditions which you'll need to accept. 通过命令行更新软件包,将向您显示您需要接受的条款和条件。

- Install or update to the latest version -安装或更新到最新版本

This will install the latest platform-tools at the time you run it. 这将在您运行时安装最新的platform-tools

# Android SDK Tools 25.2.3 and lower. Install the latest `platform-tools` for android-25
android update sdk --no-ui --all --filter platform-tools,android-25,extra-android-m2repository# Android SDK Tools 25.2.3 and higher
sdkmanager --update

- Install a specific version ( 25.0.1 , 24.0.1 , 23.0.1 ) -安装特定的版本( 25.0.124.0.123.0.1

You can also install a specific version like so: 您还可以安装特定的版本,如下所示:

# Build Tools 23.0.1, 24.0.1, 25.0.1
android update sdk --no-ui --all --filter build-tools-25.0.1,android-25,extra-android-m2repository
android update sdk --no-ui --all --filter build-tools-24.0.1,android-24,extra-android-m2repository
android update sdk --no-ui --all --filter build-tools-23.0.1,android-23,extra-android-m2repository
# Alter the versions as required                      ↑               ↑# -u --no-ui  : Updates from command-line (does not display the GUI)
# -a --all    : Includes all packages (such as obsolete and non-dependent ones.)
# -t --filter : A filter that limits the update to the specified types of
#               packages in the form of a comma-separated list of
#               [platform, system-image, tool, platform-tool, doc, sample,
#               source]. This also accepts the identifiers returned by
#               'list sdk --extended'.# List version and description of other available SDKs and tools
android list sdk --extended
sdkmanager --list

#4楼

I have resolved the issue by below steps: 我已通过以下步骤解决了该问题:

  1. update the android sdk with command "tools/android update sdk --no-ui" 使用命令“ tools / android update sdk --no-ui”更新android sdk
  2. got to android sdk folder on jenkins machines, create "licenses" folder 进入jenkins机器上的android sdk文件夹,创建“许可证”文件夹
  3. created file named "android-sdk-license" and paste the license from dev machine 创建了名为“ android-sdk-license”的文件,并从开发机粘贴了许可证

#5楼

The way to accept license agreements from the command line has changed. 从命令行接受许可协议的方式已更改。 You can use the SDK manager which is located at: $ANDROID_SDK_ROOT/tools/bin 您可以使用位于以下位置的SDK管理器: $ANDROID_SDK_ROOT/tools/bin

eg on linux: 例如在linux上:

cd ~/Library/Android/sdk/tools/bin/

Run the sdkmanager as follows: 如下运行sdkmanager:

./sdkmanager --licenses

eg on Windows: 例如在Windows上:

cd /d "%ANDROID_SDK_ROOT%/tools/bin"

Run the sdkmanager as follows: 如下运行sdkmanager:

sdkmanager --licenses

And accept the licenses you did not accept yet (but need to). 并接受您尚未接受(但需要接受)的许可证。

For more details see the Android Studio documentation , although the current documentation is missing any description on the --licenses option. 有关更多详细信息,请参阅Android Studio文档 ,尽管当前文档缺少--licenses选项的任何描述。

Warning 警告

You might have two Android SDKs on your machine. 您的计算机上可能有两个Android SDK。 Make sure to check both ~/Library/Android/sdk and /usr/local/share/android-sdk ! 确保同时检查~/Library/Android/sdk/usr/local/share/android-sdk If unsure, fully uninstall Android Studio from your machine and start with a clean slate. 如果不确定,请从您的计算机上完全卸载 Android Studio,然后从头开始。

Update: ANDROID_HOME is deprecated, ANDROID_SDK_ROOT is now the correct variable 更新:ANDROID_HOME已被弃用,ANDROID_SDK_ROOT现在是正确的变量


#6楼

Go to your $ANDROID_HOME/tools/bin and fire the cmd 转到您的$ANDROID_HOME/tools/bin并启动cmd

./sdkmanager --licenses

Accept All licenses listed there. 接受此处列出的所有许可证。

After this just go to the licenses folder in sdk and check that it's having these five files: 之后,只需转到sdk中的licenses文件夹,并检查其中是否包含以下五个文件:

android-sdk-license, android-googletv-license, android-sdk-preview-license, google-gdk-license, mips-android-sysimage-license

Give a retry and build again, still jenkins giving 'licenses not accepted' then you have to give full permission to your 'sdk' directory and all it's parent directories. 进行重试并再次构建,仍然是詹金斯(Jenkins)给出“不接受许可证”,那么您必须对“ sdk”目录及其所有父目录授予完全许可。 Here is the command: 这是命令:

sudo chmod -R 777 /opt/

If you having sdk in /opt/ directory. 如果您在/ opt /目录中有sdk。

您尚未接受以下SDK组件的许可协议[重复]相关推荐

  1. android 编程klinon,android - 您尚未接受以下SDK组件的许可协议

    android - 您尚未接受以下SDK组件的许可协议 这个问题在这里已有答案: 自动接受所有SDK许可证                                     34个答案 我下载了 ...

  2. 面向 Android 软件开发套件(SDK)的 x86 Android* 系统映像许可协议

    英特尔公司面向 Android 软件开发套件(SDK)的 x86 Android* 系统映像的内部评估许可协议 此<内部评估许可协议>(以下简称"协议") 的订立双方为 ...

  3. 英特尔公司面向 Android 软件开发套件(SDK)4.3 的 x86 Android* 系统映像的内部评估许可协议...

    此<内部评估许可协议>(以下简称"协议") 的订立双方为英特尔与贵方(作为开发人员个人或法律实体 - 下文认定为"接收方"). 英特尔应根据< ...

  4. 重装VMare出错:用户在命令行上发出了EULAS_AGREED=1,表示不接受许可协议

    重装VMare出错: 我安装的VMware-workstation-full-15.5.6-16341506版本,安装之后由于没有虚拟网卡出现,卸载了该版本,准备重装.重装时出错:提示用户在命令行上发 ...

  5. 虚拟机安装之用户在命令行上发出了EULAS AGREED=1,表示不接受许可协议(虚拟机卸载残留)

    用户在命令行上发出了EULAS AGREED=1,表示不接受许可协议(虚拟机卸载残留) 因为我根据网上的教程来操作的,经常没成功,所以过程我没截图,以下部分截图来源于我采取的别的博主的图片,原文链接如 ...

  6. 用户在命令行上发出了EULAS AGREED=1,表示不接受许可协议(虚拟机卸载残留)

    文章目录 前言 一.kali虚拟机安装 二.用户在命令行上发出了EULAS AGREED=1,表示不接受许可协议 1.解决方案一 2.解决方案二 3.不支持降级安装 前言 身为网安人员,手上怎么能没有 ...

  7. 安装时提示用户在命令行上发出了EULAS_AGREED=1,表示不接受许可协议

    安装虚拟机安装不上,换了好几个版本,有的版本显示"安装时提示用户在命令行上发出了EULAS_AGREED=1,表示不接受许可协议",有的版本显示不访问网络位置信息. 以上出现的原因 ...

  8. 接受许可协议 将禁用_知识产权小知识|知识产权许可

    知识产权许可 知识产权许可:知识产权许可,是指许可方将所涉知识产权授予被许可方按照约定使用的活动,简称许可.中文名:知识产权许可外文名:Intellectual property license释义: ...

  9. iOS开发者程序许可协议

    请仔细阅读下面的许可协议条款和条件之前下载或使用苹果软件.   这些条款和条件构成你和苹果之间的法律协议. iOS开发者程序许可协议 目的 你想使用苹果软件(如下定义)来开发一个或多个应用程序(如下定 ...

最新文章

  1. 省市县导入mysql代码,通过csv
  2. Mysqldump参数大全(参数来源于mysql5.5.19源码)
  3. c++ vector 中的坑
  4. php表单确认密码,jQuery表单验证之密码确认实例详解
  5. 2.3单链表的基本使用及其cpp示例
  6. 刘润、叶军、付晓岩等大咖同台“论道”:如何成为数字化经济中的刚需人才?|福利赠票...
  7. Q106:Linux系统下安装编译PBRT-V3
  8. D3.js学习(二)
  9. delphi7文件服务器,使用Delphi7进行OPC服务器的开发.pdf
  10. ria技术_JavaFXpert RIA示例挑战截止日期已延长
  11. 深测「小度人工智能音箱1S」:加冕的红外控制术,和掀起的一场智能大进化...
  12. 卸载mysql front_完全卸载mysql
  13. js身份证号计算性别
  14. 彩云之南,难忘的地方
  15. api与密度转换公式_原油API度与比重换算表摄氏15
  16. 编码器verilog实现
  17. 01-Redis核心数据结构和高性能原理
  18. 3d 角色血条制作方案:解决近大远小的策略
  19. 石门一中2021年高考成绩查询,石门一中火了!2020年高考成绩再次刷新记录
  20. 2018端午小长假人气榜发布:上海迪士尼蝉联景区人气榜首

热门文章

  1. matlab conj 符号,英语conj大全,matlab去掉conj
  2. Linux System Administration
  3. 路由 路由分类(IGP与EGP、直连、静态、动态)与路由表介绍
  4. Flink基于 DataStream API 实现欺诈检测
  5. 从小白到大神的起步(一起加油!!)
  6. 36.(cesium篇)cesium站立的圆面
  7. 踩到了不可见字符\u200B的坑(0长度的字符)
  8. Wannafly交流赛1 _A_有理数 【水】
  9. 企业项目管理软件行业调研报告 - 市场现状分析与发展前景预测
  10. Streamlit如何展示3D模型?