参考:http://blog.sina.com.cn/s/blog_9935b66001012ovj.html
——————————————————————————————————————————————————————————
其中 遇到的问题:
(1)proguardgui 不能运行jdk8
解决: 因为我的proguard版本是4.7的,不兼容jdk8,所以下载最近的proguardgui工具 进行混淆。
(2)混淆文件 -keep 错误。
解决:去除-keep public class com.android.vending.licensing.ILincensingService
(3)报导出空文件错误
解决:
The output jar is empty. Did you specify the proper '-keep' options?
解决:-keep class org.bl.hibernate.* {
public <fields>;
public <methods>;
*** set*(***);
*** get*();
}
.....继续加其他的要保留的类和方法,有多少写多少。我是把test.jar里的所有类都加进来
解决:-keep class org.bl.hibernate.* {
public <fields>;
public <methods>;
*** set*(***);
*** get*();
}
.....继续加其他的要保留的类和方法,有多少写多少。我是把test.jar里的所有类都加进来
The output jar is empty. Did you specify the proper '-keep' options?
解决:-keep class org.bl.hibernate.* {
public <fields>;
public <methods>;
*** set*(***);
*** get*();
}
.....继续加其他的要保留的类和方法,有多少写多少。我是把test.jar里的所有类都加进来
解决:-keep class org.bl.hibernate.* {
public <fields>;
public <methods>;
*** set*(***);
*** get*();
}
.....继续加其他的要保留的类和方法,有多少写多少。我是把test.jar里的所有类都加进来
总结:将 java 源码 封装成jar 包, 并用proguardgui 进行混淆。 混淆 目前只是混淆了变量 ,方法 和其他的东西 还不了解。