自动接受所有SDK许可证 [英] Automatically accept all SDK licences

查看:225
本文介绍了自动接受所有SDK许可证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于gradle安卓插件 2.2-alpha4
$ b


Gradle将尝试下载缺少的SDK包,即项目
依赖于


这真是太酷了,知道是 $ / $> $ / $> b
$ b


您尚未接受以下SDK
组件的许可协议:[Android SDK Build-Tools 24,Android SDK Platform 24]。
在构建项目之前,您需要接受许可证
协议,并使用Android Studio SDK Manager完成缺失组件
的安装。或者,要了解如何
将许可协议从一个工作站传输到另一个工作站,请转到
http://d.android.com/r/studio-ui/export-licenses.html


这是一个问题,因为我希望在执行 gradle build 时安装所有sdk依赖项。



我正在寻找解决方案来自动接受所有许可证。也许是一个gradle脚本?
您有什么想法吗?

谢谢!



解决方案是执行:

  android update sdk --no-ui  - 过滤器build-tools-24.0.0,android-24,extra-android-m2repository 

安装它手动,但它是gradle的新功能。





更好解决方案是使用sdkmananger:

 是| sudo sdkmanager --license 


解决方案

AndroidSDK最终可以接受许可证。

 是| sdkmanager --licenses 


Since gradle android plugins 2.2-alpha4:

Gradle will attempt to download missing SDK packages that a project depends on

Which is amazingly cool and was know to be a JakeWharton project.

But, to download the SDK library you need to: accept the license agreements or gradle tells you:

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

And this is a problem because I would love to install all sdk dependencies while doing a gradle build.

I am looking for a solution to automatically accept all licenses. Maybe a gradle script ? Do you have any ideas ?

Thanks!

[EDIT]

A solution was to execute:

android update sdk --no-ui --filter build-tools-24.0.0,android-24,extra-android-m2repository

And install it manually, but it is the gradle's new feature purpose to do it.

[EDIT 2]

A better solution is to use the sdkmananger:

yes | sudo sdkmanager --licenses

解决方案

AndroidSDK can finally accept licenses.

yes | sdkmanager --licenses

这篇关于自动接受所有SDK许可证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆