proguard警告:配置保留入口点....但不保留描述符类 [英] proguard warning: the configuration keeps the entry point....but not the descriptor class

查看:392
本文介绍了proguard警告:配置保留入口点....但不保留描述符类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经配置:

-keep ,allowoptimization,allowobfuscation,allowshrinking public class     org.jf.dexlib2.dexbacked.** {
    *;
}

但仍收到警告:

 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'

我正在使用Proguard 4.7(在Android SDK中)

I am using proguard version 4.7 (in Android SDK)

我该怎么办?

推荐答案

您已告诉Proguard保留某种方法void foo(Bar bar);,但混淆了描述符类Bar.

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

这仅是一个问题,如果您打算从外部源调用该方法,因为签名将因混淆而改变(如果您使用Proguard混淆了一个库,然后在另一个应用程序中使用了该库).

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).

因此有以下选择:

  • 配置Proguard也保留Bar.

使用-dontnote指令告诉Proguard不要打印此类注释.

Use the -dontnote directive to tell Proguard not to print notes like this.

这篇关于proguard警告:配置保留入口点....但不保留描述符类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆