I've configured:
-keep ,allowoptimization,allowobfuscation,allowshrinking public class org.jf.dexlib2.dexbacked.** {
*;
}
but still getting the warning:
Note: the configuration keeps the entry point 'com.trusteer.trf.dex_parser { int get_strings_count(org.jf.dexlib2.dexbacked.DexBackedDexFile); }', but not the descriptor class 'org.jf.dexlib2.dexbacked.DexBackedDexFile'
I am using proguard version 4.7 (in Android SDK)
What should I do?
From the docuemnts:
So it appears that you need to remove the
allowshrinking
modifier.I did some digging in the docs. You have not supplied your whole configuration file, but I'm guessing that that
com.trusteer.trf.dex_parser
is set to both keep and not to obfuscate.This means that there is a refrence from
com.trusteer.trf.dex_parser
to a class calledorg.jf.dexlib2.dexbacked.DexBackedDexFile
that was either shrunk or obfuscated. This means that the link is now broken -dex_parser
can't importDexBackedDexFile
.So either disable shrinking and obfuscation for
DexBackedDexFile
, or allow optimization and obfuscation ondex_parser
.You have told Proguard to keep a certain method
void foo(Bar bar);
but to obfuscate the descriptor classBar
.This is only a problem if you are going to invoke the method from an external source as the signature will be changed by the obfuscation (if you use Proguard to obfuscate a library and then use that library in another app).
So have the following choices:
Configure Proguard to also keep
Bar
.Use the
-dontnote
directive to tell Proguard not to print notes like this.Note: the configuration keeps the entry point '...', but not the descriptor class '...' Your configuration contains a -keep option to preserve the given method (or field), but no -keep option for the given class that is an argument type or return type in the method's descriptor. You may then want to keep the class too. Otherwise, ProGuard will obfuscate its name, thus changing the method's signature. The method might then become unfindable as an entry point, e.g. if it is part of a public API. You can automatically keep such descriptor classes with the -keep option modifier includedescriptorclasses (-keep,includedescriptorclasses ...). You can switch off these notes by specifying the -dontnote option.
Add this line in your 'proguard-rules.pro' file to fix this problem .