Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

proguard warning: the configuration keeps the entry point....but not the descriptor class

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?

like image 400
user3398598 Avatar asked Feb 24 '15 08:02

user3398598


People also ask

How do you keep a class in ProGuard?

-keepclassmembernames. This is the most permissive keep directive; it lets ProGuard do almost all of its work. Unused classes are removed, the remaining classes are renamed, unused members of those classes are removed, but then the remaining members keep their original names.

How do I debug a ProGuard issue?

To debug Proguard/R8 configuration one can assemble release build and navigate to app\build\outputs\mapping\release . There you'll see the following files: configuration. txt – merged file with all configurations – from your app, default Android, AAPT, all the libraries, etc.

What is Dontwarn in ProGuard?

If your code works fine without the missing classes, you can suppress the warnings with '-dontwarn' options. ( http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass) Warning: there were 2 unresolved references to program class members. Your input classes appear to be inconsistent.

What does Minifyenabled do?

minify is an Android tool that will decrease the size of your application when you go to build it. It's extremely useful as it means smaller apk files! It detects any code or libraries that aren't being used and ignores them from your final apk.


1 Answers

You have told Proguard to keep a certain method void foo(Bar bar); but to obfuscate the descriptor class Bar.

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.

like image 70
William Avatar answered Sep 28 '22 03:09

William