我究竟错在ProGuard的配置中删除日志行? [英] What am i doing wrong in ProGuard configuration to remove log lines?
本文介绍了我究竟错在ProGuard的配置中删除日志行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从我的apk删除记录的线条和我使用ProGuard的这一点。
它不删除行,有什么可以是问题? (我知道,ProGuard的是,因为我通过反编译测试APK,看它是否被混淆)
这是我的ProGuard配置文件的全部内容:
-assumenosideeffects类android.util.Log {
公共静态布尔isLoggable(java.lang.String中,INT);
公共静态INT V(...);
公共静态INT I(...);
公共静态INT W(......);
公共静态INT D(...);
公共静态INT E(...);
}
解决方案
您只有在优化未禁用删除日志,这就要求在指定 project.properties $ C不同的全局配置文件$ C>:
proguard.config = $ {} sdk.dir /tools/proguard/proguard-android-optimize.txt:proguard-project.txt
类似的问题和答案:
- 使用ProGuard删除日志呼叫
- Removing ProGuard的优化 在未使用的字符串
- Removing使用ProGuard记录不删除字符串被记录
- How到config我的ProGuard-project.txt文件来删除日志只是
- Android Proguard的选项 - 更严格的规则和放大器;删除日志语句
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(...);
}
解决方案
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:
- Removing Log call using proguard
- Removing unused strings during ProGuard optimisation
- Removing logging with ProGuard doesn't remove the strings being logged
- How to config my proguard-project.txt file to remove just Logs
- Android Proguard Options - Stricter Rules & Remove Log Statements
这篇关于我究竟错在ProGuard的配置中删除日志行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文