org.apache.http.*工具包出错的问题
2016-04-22 17:38
288 查看
首先:
在android 6.0(API 23)中,Google已经移除了移除了Apache HttpClient相关的类
推荐使用HttpUrlConnection,如果要继续使用需要Apache HttpClient,需要在eclipse下libs里添加org.apache.http.legacy.jar,android studio里在相应的module下的build.gradle中加入:
android {
useLibrary 'org.apache.http.legacy'
}
上面的jar包在:**\android-sdk-windows\platforms\android-23\optional下(需要下载android 6.0的SDK)
同时也移除了SSL 和Notification的setLatestEventInfo方法
以上的大体正确,但是要注意:
具体添加的位置是这个:
该目录之下的:
对于这个问题上次已经遇到过一次了,半路退怯,这次又是,遂不能忍,最后编译,ok!
在android 6.0(API 23)中,Google已经移除了移除了Apache HttpClient相关的类
推荐使用HttpUrlConnection,如果要继续使用需要Apache HttpClient,需要在eclipse下libs里添加org.apache.http.legacy.jar,android studio里在相应的module下的build.gradle中加入:
android {
useLibrary 'org.apache.http.legacy'
}
上面的jar包在:**\android-sdk-windows\platforms\android-23\optional下(需要下载android 6.0的SDK)
同时也移除了SSL 和Notification的setLatestEventInfo方法
以上的大体正确,但是要注意:
具体添加的位置是这个:
该目录之下的:
对于这个问题上次已经遇到过一次了,半路退怯,这次又是,遂不能忍,最后编译,ok!
相关文章推荐
- TCP深入详解
- HTTP
- SIP协议-网络抓包分析与实战
- 通信协议 - HTTP、TCP、UDP
- Android移动端IM开发之应用层实现TCP长连接多路复用
- iOS之HTTPS的基本使用
- TCP三次握手
- TCP与UDP区别小结
- 快速了解必要的网络知识
- 神经网络初识
- 2014上海网络赛1004||hdu5045 contest【状态压缩dp】
- android在线源码查看http://androidxref.com/
- Meta http-equiv属性详解(转)
- Stanford机器学习笔记-5.神经网络Neural Networks (part two)
- Stanford机器学习笔记-4. 神经网络Neural Networks (part one)
- HTTP1.0和HTTP1.1的区别
- mac命令行配置网络
- BP神经网络的网络带宽预测
- Android网络状态实时监听器
- Retrofit 和 http_ok 获取ip