What am i doing wrong in ProGuard configuration to

2019-08-31 00:20发布

I am trying to remove logging lines from my apk and i use proguard for this.

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)

This is the full contents of my proguard config file:

-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(...);
}

1条回答
萌系小妹纸
2楼-- · 2019-08-31 01:05

You can only remove logging if optimization is not disabled, which requires specifying a different global configuration file in project.properties:

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

Similar questions and answers:

查看更多
登录 后发表回答