错误:(15,0)在根项目'ud839_Miwok-Starter-code'上找不到参数[build_41ptob9czd5ucux9ngzednsn4 $ _run_closure1 @ 100eeb5]的方法android()。 打开文件
我还尝试通过仍可以连接互联网的方式重建gradle,
下面是我的build.gradle代码
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
android {
buildToolsVersion "28.0.3"
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
答案 0 :(得分:0)
您的build.gradle
文件属于项目级别。请将以下行移至模块 build.gradle
文件。
android {
buildToolsVersion "28.0.3"
}