如何避免在ProGuard GUI中出现警告 [英] how to avoid warnings in ProGuard GUI

查看:200
本文介绍了如何避免在ProGuard GUI中出现警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试使用ProGuard(5.3.2)混淆自动化框架时,收到了很多警告,我通过添加相应的库解决了大多数警告,但无法解决以下警告.我已经尝试过通过添加com.hibernate-core jar来尝试,但是还是一样.

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

我尝试搜索解决方案,但答案始终是针对Android应用程序.

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

推荐答案

我发现可以在Proguard GUI中选择一个选项.请检查图片:

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

此方法有助于混淆.jar文件中的类名或方法名.

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

如果要在从android studio或eclipse创建文件时忽略警告,只需在proguard-rule.pro文件中放入一些"-dontwarn"或"-ignorewarning"命令即可.

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.

这篇关于如何避免在ProGuard GUI中出现警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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