【问题标题】:Proguard comes out of the box in android Studio? What does it means?Proguard 在 android Studio 中开箱即用?这是什么意思?
【发布时间】:2022-01-19 05:36:44
【问题描述】:

我正在阅读一篇关于 Android Studio 中 Proguard 的文章,它们是一行

Proguard 在 android Studio 中开箱即用

谁能给我解释一下?如果您有兴趣阅读完整的文章,我会将链接放在下面。

Article Link

【问题讨论】:

标签: android proguard


【解决方案1】:

这意味着proguard与你的默认android项目捆绑在一起,你不需要通过gradle或maven从外部下载它

android {
    buildTypes {
        release {
            // Enables code shrinking, obfuscation, and optimization for only
            // your project's release build type.
            minifyEnabled true// Enables resource shrinking, which is performed by the
            // Android Gradle plugin.
            shrinkResources true// Includes the default ProGuard rules files that are packaged with
            // the Android Gradle plugin. To learn more, go to the section about
            // R8 configuration files.
            proguardFiles getDefaultProguardFile(
                    'proguard-android.txt'),
                    'proguard-rules.pro'
        }
    }
    ...
}

参考:More on proguard usage in android

【讨论】:

    猜你喜欢
    • 2017-07-19
    • 1970-01-01
    • 2015-04-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-07
    相关资源
    最近更新 更多