Android Studio的工程错误Could not find method runProguard() for arguments [false] on BuildType_Decorated

在编译开源项目https://github.com/qdk0901/FakeXX时,出现以下提示


F:\OpenSource\qdk0901\FakeXX\app\build.gradle

Error:(16, 1) A problem occurred evaluating project ':app'.
> Could not find method runProguard() for arguments [false] on BuildType_Decorated{name=release, debuggable=false, testCoverageEnabled=false, jniDebuggable=false, pseudoLocalesEnabled=false, renderscriptDebuggable=false, renderscriptOptimLevel=3, minifyEnabled=false, zipAlignEnabled=true, signingConfig=null, embedMicroApp=true, mBuildConfigFields={}, mResValues={}, mProguardFiles=[], mConsumerProguardFiles=[], mManifestPlaceholders={}} of type com.android.build.gradle.internal.dsl.BuildType.

Information:BUILD FAILED
Information:Total time: 0.667 secs
Information:1 error
Information:0 warnings
Information:See complete output in console


app/build.gradle如下:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 20
    buildToolsVersion "20.0.0"

    defaultConfig {
        applicationId "com.sxx.fakexx"
        minSdkVersion 17
        targetSdkVersion 20
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard  false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    provided files('libs/XposedBridgeApi-54.jar')
    compile files('libs/BaiduLBS_Android.jar')
}


经过查找资料,"minifyEnabled false"代替"runProguard false"就可以了,

 buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }



你可能感兴趣的:(android开发)