마지막 프로젝트에서 업데이트 한 후 오류가 발생합니다. 내 코드에는 문제가 없지만 build.gradle에 문제가 있습니다. 어떻게 고칠 수 있습니까?
여기 build.gradle 코드 :
apply plugin: 'android'
android {
compileSdkVersion 21
buildToolsVersion '20.0.0'
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
defaultConfig {
applicationId 'com.xxx.axxx'
minSdkVersion 14
targetSdkVersion 19
versionCode 6
versionName '1.0'
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:19.+'
compile files('libs/commons-codec-1.8.jar')
compile files('libs/asmack-android-8-4.0.4.jar')
compile 'com.android.support:support-v4:21.0.0'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.jakewharton:butterknife:5.1.1'
}
Gradle Sync 메시지 출력 :
Error:(27, 0) Gradle DSL method not found: 'runProguard()'
**Possible causes:
The project 'Atomic4Mobile' may be using a version of Gradle that does not contain the method.
**Gradle settings**
The build file may be missing a Gradle plugin.
**Apply Gradle plugin**
minifyEnabled
대신 사용해보십시오runProguard
.