对于The method consume(HttpEntity) is undefined for the type EntityUtils问题的解决办法
来源:互联网 发布:linux日志格式 编辑:程序博客网 时间:2024/05/16 19:41
问题 :The method consume(HttpEntity) is undefined for the type EntityUtils
原因:EntityUtils.consume(entity);这个方法是org.apache.http.util.EntityUtils类下面的。但是android.jar下面有相同的类,却没有consume()这个方法。当导包的时候会导入这个类,因为android.jar下面没有这个方法所以会报错。
解决办法:导入httpcore的jar包(对于不同版本没有测试,可能早期版本也没有这个方法)。通过下列方式把httpcore移动到最上面就可以解决问题。
0 0
- 对于The method consume(HttpEntity) is undefined for the type EntityUtils问题的解决办法
- The method consume(HttpEntity) is undefined for the type EntityUtils
- The method getDispatcherType() is undefined for the type HttpServletRequest解决办法
- The method getDispatcherType() is undefined for the type HttpServletRequest解决办法
- 问题“The method getDispatcherType() is undefined for the type HttpServletRequest”
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory的异常的原因及解决办法
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory的异常的原因及解决办法
- 对The method createBlob() is undefined for the type Hibernate异常的解决办法
- 开发中碰到的问题:The method getSystemService(String) is undefined for the type CourseFragment
- 关于The method getResources() is undefined for the type XX的问题处理
- 部署Tomcat8遇到的 “The method getDispatcherType() is undefined for the type HttpServletRequest” 问题
- The method getTextContent() is undefined for the type Node 错误解决办法
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory!
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
- The method isEmpty() is undefined for the type String/String
- The method getJspApplicationContext(ServletContext) is undefined for the type
- The method getTextContent() is undefined for the type Node
- Lua查找表元素过程(元表、__index方法是如何工作的)
- TCP的三次握手与四次挥手的状态详解
- 利用NSCache提升效率
- 一款开源的游戏服务端引擎KBEngine
- Java: static 的位置
- 对于The method consume(HttpEntity) is undefined for the type EntityUtils问题的解决办法
- Android全局使用自定义字体
- Q咨询链接
- 绝对路径和相对路径总结
- jqgrid 科学计数处理
- Android UI-开源框架ImageLoader的完美例子
- Android之NDK开发之初试宝剑
- rdlc打印时多出空白页面(reportviewer).导出多出空白页(pdf,word)
- 线框图:UED和PD对于线框图不同的定位