今天升级了下Android Studio,然后发现更新gradle,然后在sync项目的时候总是报 method not found: 'runProguard'的错误
找了很多发现不对。
最后解决办法是这样的,修改app下 build.gradle文件。
If you are using version 0.14.0 or higher of the gradle plugin, you should replace "runProguard" with"minifyEnabled" in your build.gradle files.
runProguard was renamed to minifyEnabled in version 0.14.0. For more info, See Android Build System
之前的代码
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
之后的代码
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}