https://stackoverflow.com/questions/26243480/could-not-find-method-android-for-arguments-when-building-android-project-from
The proposed solution is:
...in the root project's build.gradle:
ext { compileSdkVersion = 19 buildToolsVersion = "19.0.1" }
in all the android modules:
android { compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion }
...
One think I noticed was that this doesn't work on older versions of gradle (I was trying with 1.10 and got an error). With Gradle 2.1 this seems to work correctly though.