Since gradle android plugins 2.2-alpha4:
Gradle will attempt to download missing SDK packages that a project
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
And this is a problem because I would love to install all sdk dependencies while doing a
I am looking for a solution to automatically accept all licenses. Maybe a gradle script ?
Do you have any ideas ?
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.
A better solution is to use the sdkmananger:
yes | sudo sdkmanager --licenses