简体   繁体   English

我在ProGuard配置中删除日志行时在做什么错?

[英]What am i doing wrong in ProGuard configuration to remove log lines?

I am trying to remove logging lines from my apk and i use proguard for this. 我正在尝试从我的apk中删除日志记录行,为此我使用了proguard。

It doesn't remove the lines, what can be the problem? 它不会删除行,这可能是什么问题? (i know that proguard is on, because i test the apk by decompiling to see if it is obfuscated) (我知道proguard处于启用状态,因为我通过反编译来测试apk以查看其是否被混淆)

This is the full contents of my proguard config file: 这是我的proguard配置文件的全部内容:

-assumenosideeffects class android.util.Log {
    public static boolean isLoggable(java.lang.String, int);
    public static int v(...);
    public static int i(...);
    public static int w(...);
    public static int d(...);
    public static int e(...);
}

You can only remove logging if optimization is not disabled, which requires specifying a different global configuration file in project.properties : 仅当未禁用优化时才可以删除日志记录,这需要在project.properties指定其他全局配置文件:

  proguard.config=${sdk.dir}/tools/proguard/proguard-android-optimize.txt:proguard-project.txt

Similar questions and answers: 类似的问题和答案:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM