在编译开源项目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'
}
}