相关疑难解决方法(0)

错误:(26,0)未找到Gradle DSL方法:'runProguard()'

我正在使用带有gradle的android studio 0.9.3 'com.android.tools.build:gradle:0.14.+'

apply plugin:'com.android.application'

android {
    compileSdkVersion 19
    buildToolsVersion '20.0.0'

    defaultConfig {
        applicationId "xxx.xxx.xxx"
        minSdkVersion 16
        targetSdkVersion 19
        versionCode 1
        versionName "1.0.11"
    }

    signingConfigs{
        releaseConfig{
            storeFile file("xxxxxxx")
            storePassword = "xxxx"
            keyAlias = "xxxx"
            keyPassword = "xxxx"
        }
    }

    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.releaseConfig

            // adds version to file name
            applicationVariants.all { variant ->
                def file = variant.outputFile
                variant.outputFile = new File(file.parent, file.name.replace(".apk", "-" + defaultConfig.versionName + ".apk"))
            }
        }
    }
}

dependencies …
Run Code Online (Sandbox Code Playgroud)

android android-gradle-plugin

136
推荐指数
6
解决办法
7万
查看次数

标签 统计

android ×1

android-gradle-plugin ×1