简体   繁体   English

在Proguard的类中找不到引用的方法

[英]can't find referenced method in class with Proguard

when i execute obfuscation using proguard i get this error : 当我使用proguard执行混淆处理时,出现以下错误:

can't find referenced method 'javax.servlet.servletContext getServletContext()' in class javax.servlet.http.httpServletRequest 在类javax.servlet.http.httpServletRequest中找不到引用的方法'javax.servlet.servletContext getServletContext()'

i tried to include the servlet-api from tomcat7 , but still the same problem . 我试图包括tomcat7的servlet-api,但仍然是同样的问题。 any help ? 有什么帮助吗?

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. 忽略错误消息中的小写/大写拼写错误,这仅意味着ProGuard正在某种程度上在类路径中使用Servlet 2.5或更早版本。 This method was introduced in Servlet 3.0. 此方法在Servlet 3.0中引入 So the concrete problem is in ProGuard setup/configuration. 因此,具体问题在于ProGuard的设置/配置。 You'd need to remove any Servlet 2.5-or-older libraries from ProGuard's setup and add a Servlet 3.0 compatible one. 您需要从ProGuard的设置中删除所有Servlet 2.5或更早版本的库,并添加一个与Servlet 3.0兼容的库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM