android studio——Could not find method externalNativeBuild()

gradle同步工程时出现错误

Error:(36, 0) Could not find method externalNativeBuild() for arguments [build_cazi725f729u97iya9u1d1xfh$_run_closure2$_closure7$_closure15@20cbf76f] on ProductFlavor_Decorated{name=main, dimension=null, minSdkVersion=DefaultApiVersion{mApiLevel=16, mCode

解决方法:确保在build.gradle中,gradle最低被设置为2.2.0

即在buildscript {…}中

dependencies {
    classpath 'com.android.tools.build:gradle:2.2.0'
}
    原文作者:鸭子船长
    原文地址: https://www.cnblogs.com/zl1991/p/6385576.html
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞