how to keep all methods in a class with ProGuard

。_饼干妹妹 提交于 2019-12-05 00:14:28

Well, it is confession time. The question is bollocks. The -keepclassmembers is correct. The problem occurred because a team mate broke the code and the constructor was truly not there.

Note that if there is a change that the whole class is optimized away then you should use -keep as kharles suggested but the {*;} is needed to ensure that all methods stay in place.

Note that the {*;} is for testing only. For production one should use a more fine grained approach.

I keep the question for anybody with the same problem.

try

-keep public class com.mycompany.myclass

( use keep, and no {*;} )

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!