Since gradle android plugins 2.2-alpha4:
Gradle will attempt to download missing SDK packages that a project depends on
Which
Copy the entire licenses/ directory and paste it into the Android SDK home directory on the machine where you wish to build your projects.
https://developer.android.com/studio/intro/update.html#download-with-gradle
this resolved the issue for me