久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

錯誤:(26, 0) 找不到 Gradle DSL 方法:'runProguard()

Error:(26, 0) Gradle DSL method not found: #39;runProguard()#39;(錯誤:(26, 0) 找不到 Gradle DSL 方法:runProguard())
本文介紹了錯誤:(26, 0) 找不到 Gradle DSL 方法:'runProguard()'的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

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

I'm using android studio 0.9.3 with gradle 'com.android.tools.build:gradle:0.14.+'

應用插件:'com.android.application'

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 {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    // You must install or update the Support Repository through the SDK manager to use this dependency.
    // You must install or update the Support Repository through the SDK manager to use this dependency.
    // You must install or update the Google Repository through the SDK manager to use this dependency.
    // You must install or update the Support Repository through the SDK manager to use this dependency.
    compile 'com.android.support:support-v4:19.+'
    compile 'com.android.support:appcompat-v7:19.+'
    compile 'com.mcxiaoke.volley:library:1.0.6'
    compile 'com.google.code.gson:gson:2.2.+'
}

之前編譯的項目沒有對該文件進行任何更改,我越來越:錯誤:(26, 0) Gradle DSL 方法未找到:'runProguard()'

The project compiled before without any changes in that file, I'm getting: Error:(26, 0) Gradle DSL method not found: 'runProguard()'

如何解決?

推薦答案

據我所知 runProguard 被替換為 minifyEnabled.我仍然不確定如何為 proguard 定義配置,但 Google 搜索應該可以幫助您找出答案.

As far as I know runProguard was replaced with minifyEnabled. I am still not sure how to define the config for proguard but a Google search should help you to find out.

對于 outFile,請閱讀此處:https://groups.google.com/forum/#!topic/adt-dev/4_-5NvxuFB0 他們是怎么做的.

For the outFile read here: https://groups.google.com/forum/#!topic/adt-dev/4_-5NvxuFB0 how they do it.

簡而言之:他們使用了更復雜的版本:

In short: they used a more complex version:

applicationVariants.all { variant ->

    variant.outputs.each { output ->

        def apk = output.outputFile;
        def newName;

        // newName = apk.name.replace(".apk", "-v" + defaultConfig.versionName + "-" + variant.buildType.name.toUpperCase() + ".apk");
        if (variant.buildType.name == "release") {
            newName = apk.name.replace(".apk", "-v" + defaultConfig.versionName + "-release.apk");
        } else {
            newName = apk.name.replace(".apk", "-v" + defaultConfig.versionName + "-beta.apk");
        }

        output.outputFile = new File(apk.parentFile, newName);

        if (output.zipAlign) {
            output.outputFile = new File(apk.parentFile, newName.replace("-unaligned", ""));
        }

        logger.info('INFO: Set outputFile to ' + output.outputFile + " for [" + output.name + "]");
    }
}

這篇關于錯誤:(26, 0) 找不到 Gradle DSL 方法:'runProguard()'的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

IncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM(更新到 Android Build Tools 25.1.6 GCM/FCM 后出現 IncompatibleClassChangeError)
How to get current flavor in gradle(如何在 gradle 中獲取當前風味)
How to fix quot;unexpected element lt;queriesgt; found in lt;manifestgt;quot; error?(如何修復“意外元素lt;查詢gt;在“清單中找到錯誤?)
Multi flavor app based on multi flavor library in Android Gradle(基于 Android Gradle 中多風味庫的多風味應用)
Android dependency has different version for the compile and runtime(Android 依賴在編譯和運行時有不同的版本)
Transitive dependencies for local aar library(本地 aar 庫的傳遞依賴)
主站蜘蛛池模板: 最近中文字幕免费 | 99久久精品免费看国产四区 | 在线成人免费视频 | 精品国产成人 | 亚洲成人av在线播放 | 淫片一级国产 | 成人免费视频久久 | av日韩在线播放 | 精品国产欧美 | 成人午夜免费福利视频 | 欧美精品一区二区在线观看 | 亚洲性免费 | 自拍偷拍小视频 | 一区二区小视频 | 国产一级在线 | 国产精品日韩在线观看 | 国内精品久久久久久影视8 最新黄色在线观看 | 亚洲精品一区二 | 九九热最新视频 | 一级a性色生活片久久毛片 午夜精品在线观看 | 91资源在线 | 亚洲中午字幕 | 日本三级电影在线观看视频 | 午夜精品视频一区 | 美女黄视频网站 | 久久亚洲精品国产精品紫薇 | 青青草视频免费观看 | 国产精品国产a级 | 亚洲www啪成人一区二区 | 午夜影院操| 婷婷国产一区 | 男人天堂社区 | 四虎影院在线播放 | 黄色大片免费网站 | 在线亚洲免费视频 | 精品国产一区二区三区四区在线 | 999免费视频 | 一本色道久久综合亚洲精品高清 | 亚洲日本视频 | 一区二区三区回区在观看免费视频 | 免费在线观看成年人视频 |