我有这个 gradle 错误
错误:(21, 0) 未找到 Gradle DSL 方法:“buildConfigField()” 可能的原因:
<ul><li>The project 'Sunshine' may be using a version of Gradle that does not contain the method.
<a href="openGradleSettings">Gradle settings</a></li><li>The build file may be missing a Gradle plugin.
<a href="apply.gradle.plugin">Apply Gradle plugin</a></li>
Run Code Online (Sandbox Code Playgroud)
我的 build.gradle 代码在这里
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.example.boxerrebellion.sunshine.app"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildTypes.each {
it.buildConfigField …Run Code Online (Sandbox Code Playgroud)