can't find referenced method in class with Proguard

不问归期 提交于 2019-12-13 01:25:59

问题


when i execute obfuscation using proguard i get this error :

can't find referenced method 'javax.servlet.servletContext getServletContext()' in class javax.servlet.http.httpServletRequest

i tried to include the servlet-api from tomcat7 , but still the same problem . any help ?


回答1:


Ignoring your lowercase/uppercase typos in the error message, this can only mean that ProGuard is somehow using Servlet 2.5 or older in the classpath. This method was introduced in Servlet 3.0. So the concrete problem is in ProGuard setup/configuration. You'd need to remove any Servlet 2.5-or-older libraries from ProGuard's setup and add a Servlet 3.0 compatible one.



来源:https://stackoverflow.com/questions/10283581/cant-find-referenced-method-in-class-with-proguard

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