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.
解决Android项目构建错误
本文提供了一种解决方案来解决在使用Gradle构建Android项目时出现的'Could not find method android for arguments'错误。通过在根项目的build.gradle文件中定义编译SDK版本和构建工具版本,并在所有Android模块中引用这些值,可以避免此问题。值得注意的是,这种方法在旧版本的Gradle中可能不起作用。
1175

被折叠的 条评论
为什么被折叠?



