当我创建一个模糊的jar时,我遇到了一些关于yguard库的问题。
Yguard移除默认的构造器类型,如下所示(无参数,无可见性):
Test(){
} 你知道为什么它删除了这种类型的构造函数吗?
你有解决这个问题的办法吗?
谢谢,
诚挚的问候,
发布于 2012-11-22 20:36:46
我相信由于shrink task的缘故,yGuard删除了这样的构造函数。只需排除您的类,使其不会像这样收缩(由predi从this answer获取):
<shrink logfile="obfuscate_shrink_log.xml">
<property name="error-checking" value="pedantic"/>
<keep>
<method name="void main(java.lang.String[])" class="package.path.to.main.Class"/>
<class name="package.path.to.my.implementation.of.DatatypeLibraryFactory" methods="public"/>
<class classes="public"/>
</keep>
或使用yGuard文档(http://www.yworks.com/products/yguard/yguard_ant_howto.html#hints)的故障排除部分中介绍的技术。
https://stackoverflow.com/questions/12512249
复制相似问题