问题
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