我剛剛更新了我的Android Studio,現在我的項目不再生成。我得到以下錯誤:Android Studio更新後:未找到Gradle DSL方法:'runProguard()'
Error:(16, 0) Gradle DSL method not found: 'runProguard()'
Possible causes:<ul><li>The project 'App' 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>
我沒有改變任何東西,一切正常工作之前更新。這是我的build.gradle
文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.ochs.pipette"
minSdkVersion 10
targetSdkVersion 21
versionCode 8
versionName "1.6"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:21.0.0'
compile 'it.sephiroth.android.library.imagezoom:library:1.0.4'
compile 'com.android.support:palette-v7:21.0.+'
}
而這裏的另一個:
// 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:1.0.0-rc2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
我不知道如何解決這個問題,任何人都可以幫助我嗎?
你的意思是的build.gradle文件是在app文件夾,而不是文件的build.gradle是在項目的頂級水平。 N'est-ce pas? – 2015-06-03 19:58:48
這就是我的意思。 Toutàfait! – rousseauo 2015-06-04 23:11:48