首页 > 解决方案 > 如何识别导致类或成员保留在android中的proguard规则?

问题描述

在我的 android 构建过程中,我看到 proguard 发出了大量的注释:

ProGuard, version 6.0.3
Printing configuration to [/home/me/app/proconfout.txt]...
...
Note: the configuration keeps the entry point 'com.me.Class$CacheKey$1 { java.lang.Object extractValue(com.me.Class); }', but not the descriptor class 'com.me.Class'
Note: the configuration keeps the entry point 'com.me.Class$CacheKey$2 { java.lang.Object extractValue(com.me.Class); }', but not the descriptor class 'com.me.Class'
Note: the configuration keeps the entry point 'com.me.Class$CacheKey$3 { java.lang.Object extractValue(com.me.Class); }', but not the descriptor class 'com.me.Class'
Note: the configuration keeps the entry point 'com.me.Class$CacheKey$4 { java.lang.Object extractValue(com.me.Class); }', but not the descriptor class 'com.me.Class'
...

查看合并的 proguard 配置,我没有发现保留特定方法 proguard 的原因。合并的 proguard 配置长 1000 行并没有多大帮助。是否有任何技巧可以确定为什么 proguard 保留它所记录的方法?

标签: androidproguard

解决方案


推荐阅读