how to avoid warnings in ProGuard GUI

2019-07-29 16:08发布

While trying to use ProGuard (5.3.2) to obfuscate a Automation framework getting lot of warnings i've resolved most of the warnings by adding respective library's but could not able to resolve below warnings. i have tried by adding com.hibernate-core jar but still getting same.

Warning: com.test.utils.DBOperations: can't find referenced method 'org.hibernate.Session openSession()' in library class org.hibernate.SessionFactory
Warning: com.test.utils.DBOperations: can't find referenced method 'void close()' in library class org.hibernate.Session

I have tried searching for a solution but the answer would always be for an android application.

1条回答
狗以群分
2楼-- · 2019-07-29 16:46

I have find there is an option that I can select inside the Proguard GUI. Please check the picture:

enter image description here

This method is good for obfuscation the class name or method name inside the .jar file.

If you want to ignore the warning when creating from android studio or eclipse... just put some "-dontwarn" or "-ignorewarning" command inside the proguard-rule.pro file.

查看更多
登录 后发表回答