gradle.build文件的release块中的minifyEnabled false表示什么 [英] What is meant the minifyEnabled false in the release block in the gradle.build file

查看:535
本文介绍了gradle.build文件的release块中的minifyEnabled false表示什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

也许我的问题似乎很简单并且重复.但这对我来说是一个重要的问题.我有android studio 1.3,当我创建一个新的默认项目,然后打开 build.gradle(Module:app)时,我在 build.gradle(Module:app)文件.您还应该知道,当我编译项目时,android studio会制作两个 apk 文件,它们都以 debug 模式使用.在 release 块中使用以下代码,而 minifyEnabled false .现在我想知道,尽管有这些条件,当我编译项目时,android studio是否真的使用 proguard 中的代码?谢谢你.

Perhaps my question seems a simple question and duplicate. But it is for me an important question. I have android studio 1.3 and when I create a new default project and then when I open the build.gradle(Module:app) , I see the following code in part of build.gradle(Module:app)file. Also you should know that when I compile my project, android studio makes two apk files that both are as the debug mode. in the following code is used from the release block and the minifyEnabled is false. Now I want to know that despite these conditions, when I compile my project, does the android studio use from proguard really? Thank you in advanced.

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

推荐答案

标志 minifyEnabled 保留在ProGuard中,并且默认情况下处于关闭状态.因此,在默认设置中,调试和发布版本均未使用ProGuard,并且有效地忽略了参数 proguardFiles

Flag minifyEnabled stays for ProGuard, and it's turned off by default. So, in default setup both debug and release builds aren't using ProGuard, and parameter proguardFiles is effectively ignored

这篇关于gradle.build文件的release块中的minifyEnabled false表示什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆